[PR #9200] [CLOSED] model: add new engine support for qwen2 family #12885

Closed
opened 2026-04-13 00:11:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9200
Author: @BruceMacD
Created: 2/18/2025
Status: Closed

Base: brucemacd/rope-configHead: brucemacd/qwen2_5


📝 Commits (3)

  • 9dc1fb8 model: add new engine support for qwen2 family
  • f93bd92 model: document qwen2 forward pass
  • 2c03000 standard repqFreq var names

📊 Changes

2 files changed (+223 additions, -0 deletions)

View changed files

📝 model/models/models.go (+1 -0)
model/models/qwen2/model.go (+222 -0)

📄 Description

This PR introduces support for Qwen2 language models in our Go model engine.

Key Changes:

  • Implemented forward pass for the Qwen2 family
  • Added necessary tokenizer and model-specific parameters

Technical Considerations:

  1. Model Declaration Patterns
    There is significant overlap in the model declaration logic between Qwen2 and Llama3 families. While this creates some code duplication, keeping the declarations separate currently offers better clarity and maintainability than attempting to share implementation details between different model families.

  2. Code Readability Improvements

    • Replaced single-letter variables with descriptive names
    • Enhanced code documentation for better maintainability
    • Structured model parameters more intuitively

Dependencies:

  • Requires changes from PR #9121 to be merged first

Future Considerations:
The model declaration logic between Qwen2 and Llama3 families shows significant overlap. As we add more model families, we'll need to evaluate our architecture around shared patterns.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/9200 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 2/18/2025 **Status:** ❌ Closed **Base:** `brucemacd/rope-config` ← **Head:** `brucemacd/qwen2_5` --- ### 📝 Commits (3) - [`9dc1fb8`](https://github.com/ollama/ollama/commit/9dc1fb8a9123a5634c7b0dade71be56fb46ef01c) model: add new engine support for qwen2 family - [`f93bd92`](https://github.com/ollama/ollama/commit/f93bd9202790887489833a1c4511e5f09073f6fa) model: document qwen2 forward pass - [`2c03000`](https://github.com/ollama/ollama/commit/2c0300073f5b74fecf6d5230af5e1cf5177ea47d) standard repqFreq var names ### 📊 Changes **2 files changed** (+223 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `model/models/models.go` (+1 -0) ➕ `model/models/qwen2/model.go` (+222 -0) </details> ### 📄 Description This PR introduces support for Qwen2 language models in our Go model engine. Key Changes: - Implemented forward pass for the Qwen2 family - Added necessary tokenizer and model-specific parameters Technical Considerations: 1. Model Declaration Patterns There is significant overlap in the model declaration logic between Qwen2 and Llama3 families. While this creates some code duplication, keeping the declarations separate currently offers better clarity and maintainability than attempting to share implementation details between different model families. 2. Code Readability Improvements - Replaced single-letter variables with descriptive names - Enhanced code documentation for better maintainability - Structured model parameters more intuitively Dependencies: - Requires changes from PR #9121 to be merged first Future Considerations: The model declaration logic between Qwen2 and Llama3 families shows significant overlap. As we add more model families, we'll need to evaluate our architecture around shared patterns. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:11:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#12885