[PR #813] [MERGED] refactor llm/llama.go #9077

Closed
opened 2025-11-12 14:58:40 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/813
Author: @mxyng
Created: 10/16/2023
Status: Merged
Merged: 10/17/2023
Merged by: @mxyng

Base: mainHead: mxyng/llama


📝 Commits (2)

📊 Changes

1 file changed (+38 additions, -90 deletions)

View changed files

📝 llm/llama.go (+38 -90)

📄 Description

  • remove unused struct GenerationSettings
  • remove a layer of indirection for prediction request. it's only used in one place so it's nicer to have a map[string]any instead of a struct
  • nest Timings for similar reasons
  • use CutPrefix to both check for data: and trimming

🔄 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/813 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 10/16/2023 **Status:** ✅ Merged **Merged:** 10/17/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/llama` --- ### 📝 Commits (2) - [`094df37`](https://github.com/ollama/ollama/commit/094df3756393b49ca287a0a85702938fe76918aa) remove unused struct - [`b36b0b7`](https://github.com/ollama/ollama/commit/b36b0b71f8753acc99ec5ddab748223c21ada3f2) use cut prefix ### 📊 Changes **1 file changed** (+38 additions, -90 deletions) <details> <summary>View changed files</summary> 📝 `llm/llama.go` (+38 -90) </details> ### 📄 Description - remove unused struct GenerationSettings - remove a layer of indirection for prediction request. it's only used in one place so it's nicer to have a `map[string]any` instead of a struct - nest `Timings` for similar reasons - use `CutPrefix` to both check for `data:` and trimming --- <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 2025-11-12 14:58:40 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#9077