[GH-ISSUE #5526] Models Created from GGUF File Missing from api/models Endpoint (after some time) Despite Appearing in ollama list #3451

Closed
opened 2026-04-12 14:07:40 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @chrisoutwright on GitHub (Jul 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5526

Originally assigned to: @mxyng on GitHub.

What is the issue?

Issue with Getting Model over Ollama AP api/models after Creating Model in Ollama

Steps to Reproduce

  1. Execute the following command to merge GGUF files:
    example

    C:\Users\Chris>D:\llama-b3066-bin-win-avx512-x64\gguf-split --merge C:\Users\Chris\Downloads\Q4_K_M-00001-of-0002.gguf E:\openbiollm-llama-3_Q4_K_M.gguf
    

    Output:

    
    
    gguf_merge: C:\Users\Chris\Downloads\Q4_K_M-00001-of-00002.gguf -> E:\openbiollm-llama-3_Q4_K_M.gguf
    gguf_merge: reading metadata C:\Users\Chris\Downloads\Q4_K_M-00001-of-00002.gguf ...done
    gguf_merge: reading metadata C:\Users\Chris\Downloads\Q4_K_M-00002-of-00002.gguf ...done
    gguf_merge: writing tensors C:\Users\Chris\Downloads\Q4_K_M-00001-of-00002.gguf ...done
    gguf_merge: writing tensors C:\Users\Chris\Downloads\Q4_K_M-00002-of-00002.gguf ...done
    gguf_merge: E:\openbiollm-llama-3_Q4_K_M.gguf merged from 2 split with 723 tensors.
    
  2. Attempt to create a new model in Ollama:

    C:\Users\Chris>ollama create openbiollm-llama-3_Q4_K_M -f E:\openbiollm-llama-3_Q4_K_M.modelfile
    

    Output:

    transferring model data ⠋
    
    using existing layer sha256:8f3b57672da97273e31ea197ac93d6b44ec2c00af914c43c141f8a7571a3c844
    using existing layer sha256:2190828de961641d5a7b034d11c3e34f3a7e91e9ec195309770fb337231cc085
    using existing layer sha256:e9d486088426ca9362945844228c16a846e49f4d310c638fc79b60e780e46045
    using existing layer sha256:577073ffcc6ce95b9981eacc77d1039568639e5638e83044994560d9ef82ce1b
    using existing layer sha256:f2f08b422a621fe6eab6361c3cb1b66526f90b2db8ed4b54b8d5e06b8a5464f9
    writing manifest
    success
    

Issue

The Ollama tool did complete the creation of the new model successfully. Additionally, the ollama list command does show the new model, but over api/models the models is missing from the API/models list. (it happend after some hours, I did change the System template afterwords (so that is not corresponding to the modelfile:

Original modelfile:

FROM ./openbiollm-llama-3_Q4_K_M.gguf
TEMPLATE "{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"
PARAMETER stop <|start_header_id|>
PARAMETER stop <|end_header_id|>
PARAMETER stop <|eot_id|>
PARAMETER num_keep 24
SYSTEM Format the reply in MarkDown format.

Expected Behavior

The ollama create command should complete successfully and the new model should appear in the list of available models when using ollama list. Additionally, it should be listed for access in api/models, allowing for its usage in applications using the api such as Open WebUI.

Questions

  • Can the use of uppercase characters in the model name (e.g., openbiollm-llama-3_Q4_K_M) cause issues with model API listing?
  • What changes could cause the API iterator to skip over the newly created model?

Environment

  • OS: Windows 10
  • Tool Version: Ollama version (0.1.48)

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.1.48

Originally created by @chrisoutwright on GitHub (Jul 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5526 Originally assigned to: @mxyng on GitHub. ### What is the issue? ### Issue with Getting Model over Ollama AP api/models after Creating Model in Ollama #### Steps to Reproduce 1. Execute the following command to merge GGUF files: example ```shell C:\Users\Chris>D:\llama-b3066-bin-win-avx512-x64\gguf-split --merge C:\Users\Chris\Downloads\Q4_K_M-00001-of-0002.gguf E:\openbiollm-llama-3_Q4_K_M.gguf ``` Output: ``` gguf_merge: C:\Users\Chris\Downloads\Q4_K_M-00001-of-00002.gguf -> E:\openbiollm-llama-3_Q4_K_M.gguf gguf_merge: reading metadata C:\Users\Chris\Downloads\Q4_K_M-00001-of-00002.gguf ...done gguf_merge: reading metadata C:\Users\Chris\Downloads\Q4_K_M-00002-of-00002.gguf ...done gguf_merge: writing tensors C:\Users\Chris\Downloads\Q4_K_M-00001-of-00002.gguf ...done gguf_merge: writing tensors C:\Users\Chris\Downloads\Q4_K_M-00002-of-00002.gguf ...done gguf_merge: E:\openbiollm-llama-3_Q4_K_M.gguf merged from 2 split with 723 tensors. ``` 3. Attempt to create a new model in Ollama: ```shell C:\Users\Chris>ollama create openbiollm-llama-3_Q4_K_M -f E:\openbiollm-llama-3_Q4_K_M.modelfile ``` Output: ``` transferring model data ⠋ using existing layer sha256:8f3b57672da97273e31ea197ac93d6b44ec2c00af914c43c141f8a7571a3c844 using existing layer sha256:2190828de961641d5a7b034d11c3e34f3a7e91e9ec195309770fb337231cc085 using existing layer sha256:e9d486088426ca9362945844228c16a846e49f4d310c638fc79b60e780e46045 using existing layer sha256:577073ffcc6ce95b9981eacc77d1039568639e5638e83044994560d9ef82ce1b using existing layer sha256:f2f08b422a621fe6eab6361c3cb1b66526f90b2db8ed4b54b8d5e06b8a5464f9 writing manifest success ``` #### Issue The Ollama tool did complete the creation of the new model successfully. Additionally, the `ollama list` command does show the new model, but over api/models the models is missing from the API/models list. (it happend after some hours, I did change the System template afterwords (so that is not corresponding to the modelfile: Original modelfile: ``` FROM ./openbiollm-llama-3_Q4_K_M.gguf TEMPLATE "{{ if .System }}<|start_header_id|>system<|end_header_id|> {{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|> {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|> {{ .Response }}<|eot_id|>" PARAMETER stop <|start_header_id|> PARAMETER stop <|end_header_id|> PARAMETER stop <|eot_id|> PARAMETER num_keep 24 SYSTEM Format the reply in MarkDown format. ``` #### Expected Behavior The ollama create command should complete successfully and the new model should appear in the list of available models when using ollama list. Additionally, it should be listed for access in api/models, allowing for its usage in applications using the api such as Open WebUI. ### Questions - Can the use of uppercase characters in the model name (e.g., openbiollm-llama-3_Q4_K_M) cause issues with model API listing? - What changes could cause the API iterator to skip over the newly created model? #### Environment - **OS:** Windows 10 - **Tool Version:** Ollama version (0.1.48) ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.1.48
GiteaMirror added the bug label 2026-04-12 14:07:40 -05:00
Author
Owner

@chrisoutwright commented on GitHub (Jul 7, 2024):

I redid the process and now it is appearing again, I wonder if this was just some sort of artifact, or can there be a reason for it to happen?

Now I see in the json:

        {
            "id": "openbiollm-llama-3_q4_k_m:latest",
            "name": "openbiollm-llama-3_q4_k_m:latest",
            "object": "model",
            "created": 1720334158,
            "owned_by": "ollama",
            "ollama": {
                "name": "openbiollm-llama-3_q4_k_m:latest",
                "model": "openbiollm-llama-3_q4_k_m:latest",
                "modified_at": "2024-07-07T08:19:07.288578+02:00",
                "size": 42520394238,
                "digest": "5f3335bac48badee6ad39d4005f62bef5315774103170f49b710ea08798cc509",
                "details": {
                    "parent_model": "",
                    "format": "gguf",
                    "family": "llama",
                    "families": [
                        "llama"
                    ],
                    "parameter_size": "70.6B",
                    "quantization_level": "Q4_K_M"
                },
                "urls": [
                    1,
                    1
                ]
            }
        }
<!-- gh-comment-id:2212342087 --> @chrisoutwright commented on GitHub (Jul 7, 2024): I redid the process and now it is appearing again, I wonder if this was just some sort of artifact, or can there be a reason for it to happen? Now I see in the json: ``` { "id": "openbiollm-llama-3_q4_k_m:latest", "name": "openbiollm-llama-3_q4_k_m:latest", "object": "model", "created": 1720334158, "owned_by": "ollama", "ollama": { "name": "openbiollm-llama-3_q4_k_m:latest", "model": "openbiollm-llama-3_q4_k_m:latest", "modified_at": "2024-07-07T08:19:07.288578+02:00", "size": 42520394238, "digest": "5f3335bac48badee6ad39d4005f62bef5315774103170f49b710ea08798cc509", "details": { "parent_model": "", "format": "gguf", "family": "llama", "families": [ "llama" ], "parameter_size": "70.6B", "quantization_level": "Q4_K_M" }, "urls": [ 1, 1 ] } } ```
Author
Owner

@chrisoutwright commented on GitHub (Jul 7, 2024):

Seems to have happened now to my other prior imported one (here I had some capital letters as well):

image

similar to https://github.com/ollama/ollama/issues/4250#issuecomment-2102096537 ?

<!-- gh-comment-id:2212345411 --> @chrisoutwright commented on GitHub (Jul 7, 2024): Seems to have happened now to my other prior imported one (here I had some capital letters as well): ![image](https://github.com/ollama/ollama/assets/27736055/bfce0cd8-f6b4-4c1f-9614-55bcc7796fec) similar to https://github.com/ollama/ollama/issues/4250#issuecomment-2102096537 ?
Author
Owner

@mxyng commented on GitHub (Jul 8, 2024):

I'm not sure what API you're calling because that doesn't look like an Ollama API

Ollama list uses Ollama's /api/tags to list models:

$ curl -s 127.0.0.1:11434/api/tags | jq -r '.models[] | select(.model == "openbiollm-llama-3_Q4_K_M:latest")'
{
  "name": "openbiollm-llama-3_Q4_K_M:latest",
  "model": "openbiollm-llama-3_Q4_K_M:latest",
  "modified_at": "2024-07-08T15:45:19.314317663-07:00",
  "size": 5018536983,
  "digest": "5ece9b36c93bf999652e49be092c8b977db72e36283829ba647455151ae30835",
  "details": {
    "parent_model": "",
    "format": "gguf",
    "family": "gemma",
    "families": [
      "gemma"
    ],
    "parameter_size": "2.5B",
    "quantization_level": "F16"
  }
}

Ollama also provides /v1/models for OpenAI compat:

$ curl -s 127.0.0.1:11434/v1/models | jq -r '.data[] | select(.id == "openbiollm-llama-3_Q4_K_M:latest")'
{
  "id": "openbiollm-llama-3_Q4_K_M:latest",
  "object": "model",
  "created": 1720478719,
  "owned_by": "library"
}

Ignoring the model details since I copied it from gemma (e.g. ollama cp gemma openbiollm-llama-3_Q4_K_M), the sample output you provided looks nothing like either APIs Ollama provides

<!-- gh-comment-id:2215484600 --> @mxyng commented on GitHub (Jul 8, 2024): I'm not sure what API you're calling because that doesn't look like an Ollama API Ollama list uses Ollama's `/api/tags` to list models: ``` $ curl -s 127.0.0.1:11434/api/tags | jq -r '.models[] | select(.model == "openbiollm-llama-3_Q4_K_M:latest")' { "name": "openbiollm-llama-3_Q4_K_M:latest", "model": "openbiollm-llama-3_Q4_K_M:latest", "modified_at": "2024-07-08T15:45:19.314317663-07:00", "size": 5018536983, "digest": "5ece9b36c93bf999652e49be092c8b977db72e36283829ba647455151ae30835", "details": { "parent_model": "", "format": "gguf", "family": "gemma", "families": [ "gemma" ], "parameter_size": "2.5B", "quantization_level": "F16" } } ``` Ollama also provides `/v1/models` for OpenAI compat: ``` $ curl -s 127.0.0.1:11434/v1/models | jq -r '.data[] | select(.id == "openbiollm-llama-3_Q4_K_M:latest")' { "id": "openbiollm-llama-3_Q4_K_M:latest", "object": "model", "created": 1720478719, "owned_by": "library" } ``` Ignoring the model details since I copied it from gemma (e.g. `ollama cp gemma openbiollm-llama-3_Q4_K_M`), the sample output you provided looks nothing like either APIs Ollama provides
Author
Owner

@chrisoutwright commented on GitHub (Jul 9, 2024):

ah yes on second glance: it is the api from openwebui I used to check the models, in that case I will investigate then with them.
https://github.com/open-webui/open-webui/issues/3722

<!-- gh-comment-id:2215687843 --> @chrisoutwright commented on GitHub (Jul 9, 2024): ah yes on second glance: it is the api from openwebui I used to check the models, in that case I will investigate then with them. https://github.com/open-webui/open-webui/issues/3722
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3451