[PR #10302] [MERGED] ml: add arange method #59900

Closed
opened 2026-04-29 14:49:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10302
Author: @mxyng
Created: 4/16/2025
Status: Merged
Merged: 4/18/2025
Merged by: @mxyng

Base: mainHead: mxyng/arange


📝 Commits (1)

📊 Changes

5 files changed (+42 additions, -20 deletions)

View changed files

📝 kvcache/causal_test.go (+11 -0)
📝 ml/backend.go (+3 -0)
📝 ml/backend/ggml/ggml.go (+26 -0)
📝 model/models/gemma3/model_vision.go (+1 -10)
📝 model/models/mllama/model.go (+1 -10)

📄 Description

arange is a utility method to create a 1D tensor with values within an interval (start, stop]. since ggml arange does not support int32 (it first creates float32 then casts to the desired data type), create it manually


🔄 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/10302 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 4/16/2025 **Status:** ✅ Merged **Merged:** 4/18/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/arange` --- ### 📝 Commits (1) - [`149a646`](https://github.com/ollama/ollama/commit/149a646c1e127cacb8f7569832daa4945ace6794) arange ### 📊 Changes **5 files changed** (+42 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `kvcache/causal_test.go` (+11 -0) 📝 `ml/backend.go` (+3 -0) 📝 `ml/backend/ggml/ggml.go` (+26 -0) 📝 `model/models/gemma3/model_vision.go` (+1 -10) 📝 `model/models/mllama/model.go` (+1 -10) </details> ### 📄 Description arange is a utility method to create a 1D tensor with values within an interval `(start, stop]`. since ggml arange does not support `int32` (it first creates `float32` then casts to the desired data type), create it manually --- <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-29 14:49:19 -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#59900