[PR #11069] [MERGED] convert: utility for merging tensors #39301

Closed
opened 2026-04-22 23:57:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11069
Author: @mxyng
Created: 6/13/2025
Status: Merged
Merged: 6/20/2025
Merged by: @mxyng

Base: mainHead: mxyng/convert-merge-tensors


📝 Commits (1)

  • 5238164 convert: utility for merging tensors

📊 Changes

3 files changed (+174 additions, -53 deletions)

View changed files

📝 convert/convert_mixtral.go (+23 -53)
📝 convert/tensor.go (+53 -0)
📝 convert/tensor_test.go (+98 -0)

📄 Description

similar to splitDim, mergeTensors is a convert utility that stacks multiple tensors into a new tensor along a new dimension. this is particularly useful for moe models where experts are merged


🔄 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/11069 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 6/13/2025 **Status:** ✅ Merged **Merged:** 6/20/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/convert-merge-tensors` --- ### 📝 Commits (1) - [`5238164`](https://github.com/ollama/ollama/commit/5238164532922966a2c381b2e5704a9288c2b696) convert: utility for merging tensors ### 📊 Changes **3 files changed** (+174 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert_mixtral.go` (+23 -53) 📝 `convert/tensor.go` (+53 -0) 📝 `convert/tensor_test.go` (+98 -0) </details> ### 📄 Description similar to `splitDim`, `mergeTensors` is a convert utility that stacks multiple tensors into a new tensor along a new dimension. this is particularly useful for moe models where experts are merged --- <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-22 23:57:40 -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#39301