{"slug": "ollama-pull-error-invalid-model-name", "title": "Ollama pull Error invalid model name", "summary": "Ollama's model-name parser rejects remote Hugging Face references whose model component exceeds 80 characters, according to a technical analysis of the parser in Ollama's types/model/name.go file. A CPU-only test using synthetic Hugging Face references found that model names of 79 and 80 characters passed validation while 81 and 85 characters returned \"invalid model name,\" matching the failure seen with the 85-character repository name Qwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF. The analysis recommends duplicating the repository under a shorter name via the hf repos duplicate CLI or importing the GGUF locally with ollama create to bypass the Hugging Face remote identifier.", "body_md": "Hmm… after looking into it, this might be a case where the repository name + filename is **too long for Ollama**:\n\nMore precisely, I think the **repository/model-name part alone may already be long enough to hit Ollama’s model-name validator**, before Ollama gets as far as resolving or downloading the GGUF.\n\nYour command syntax itself looks reasonable. Hugging Face’s [Ollama integration docs](https://huggingface.co/docs/hub/ollama) explicitly document both:\n\n```\nollama run hf.co/{username}/{repository}:{quantization}\n```\n\nand using the full GGUF filename as the tag. So changing the long filename/tag to:\n\n```\n:Q8_0\n```\n\nwas also a sensible thing to try.\n\nThe interesting part is the repository name:\n\n```\nQwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF\n```\n\nThat part is **85 characters long**.\n\nOllama’s current [model-name parser](https://github.com/ollama/ollama/blob/main/types/model/name.go) treats a remote reference roughly as:\n\n```\nhost / namespace / model : tag\n```\n\nso your short form is effectively parsed as:\n\n```\nhost      = hf.co\nnamespace = DavidAU\nmodel     = Qwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF\ntag       = Q8_0\n```\n\nand Ollama currently limits that `model` component to **80 characters**.\n\nSo shortening only the tag from a full `.gguf` filename to `Q8_0` would not change the part that appears to be failing.\n\nI did a small CPU-only sanity check against Ollama rather than downloading the actual large model. Using otherwise equivalent synthetic Hugging Face model references, the boundary came out cleanly:\n\n``` php\nmodel part length 79 -> passed model-name validation\nmodel part length 80 -> passed model-name validation\nmodel part length 81 -> \"invalid model name\"\nmodel part length 85 -> \"invalid model name\"\n```\n\nThe actual 85-character repository name also produced the same local `invalid model name` behavior.\n\nSo I would currently treat the name-length mismatch as the **first blocker**, rather than assuming that the GGUF itself or `Q8_0` is invalid.\n\n## \n\nIf you have enough Hub storage, I think a useful test would be to duplicate the same repository under a much shorter name and leave the actual GGUF unchanged.\n\nFor example, something conceptually like:\n\n```\nyour-account/qwen38-fcf-gguf\n```\n\nand then:\n\n```\nollama run huggingface.co/your-account/qwen38-fcf-gguf:Q8_0\n```\n\nHugging Face now has a server-side repository duplication API/CLI, so this does not necessarily require manually downloading and re-uploading the whole repository:\n\n```\nhf repos duplicate \\\n  DavidAU/Qwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF \\\n  your-account/qwen38-fcf-gguf\n```\n\nSee the [repository duplication docs](https://huggingface.co/docs/huggingface_hub/guides/repository) and [`hf repos duplicate`](https://huggingface.co/docs/huggingface_hub/main/package_reference/cli).\n\nThere is also the Hugging Face [Repo Duplicator Space](https://huggingface.co/spaces/huggingface-projects/repo_duplicator) if that is more convenient.\n\nThe nice thing about this test is that it changes essentially **one variable**:\n\n```\nsame GGUF\nsame quantization\nsame Ollama\ndifferent/shorter repository identifier\n```\n\nSo if the error changes from:\n\n```\ninvalid model name\n```\n\nto something like:\n\n```\npulling manifest\n```\n\nthen even if a *different* error appears afterward, that would be useful evidence that the name-validation problem was indeed the first blocker.\n\nIf you do not want to duplicate a Hub repository at all, the other fairly standard route is to download the GGUF directly and import it locally with a short Ollama name. Ollama documents that route in its [GGUF import guide](https://docs.ollama.com/import):\n\n```\nFROM /path/to/file.gguf\n```\n\nthen:\n\n```\nollama create my-model\nollama run my-model\n```\n\nThat bypasses the Hugging Face remote-model identifier entirely.\n\n## \nWhy I think the 80-character boundary is the relevant one\n\nThe important distinction here is that the complete command being long is not, by itself, the issue.\n\nOllama parses the reference into individual components. Its source currently documents these limits:\n\n```\nnamespace: 1..80\nmodel:     1..80\ntag:       1..80\n```\n\nSee [`types/model/name.go`](https://github.com/ollama/ollama/blob/main/types/model/name.go).\n\nFor this reference:\n\n```\nhf.co/DavidAU/Qwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF:Q8_0\n```\n\nthe relevant component is:\n\n```\nQwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF\n```\n\nwhich is 85 characters.\n\nThat also explains why these two attempts can fail identically:\n\n```\nollama pull hf.co/DavidAU/<long-repo>:<very-long-full-filename.gguf>\n```\n\nand:\n\n```\nollama pull hf.co/DavidAU/<long-repo>:Q8_0\n```\n\nThe second command makes the **tag** short, but the parsed **model** part is still 85 characters.\n\nThis looks like an interoperability boundary more than a malformed Hugging Face repository. Hugging Face accepts this repository ID, while `huggingface_hub`’s own [repository-ID validator](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/_validators.py) permits repository names up to 96 characters.\n\nSo there is a small range of repository names that can be valid on the Hub but too long for Ollama’s `model` field:\n\n```\nHF-valid repository name\n        |\n        | 81..96 characters\n        v\nOllama remote model reference rejects it\n```\n\nI would describe that as a naming/interop edge case rather than saying either the model or GGUF is inherently broken.\n\n \n## \nThe small boundary test\n\nI used Ollama v0.33.3 for the runtime check and deliberately did **not** download this 27B Q8 GGUF.\n\nThe test generated fake Hugging Face references with model components of controlled length:\n\n```\n79\n80\n81\n85\n```\n\nThe synthetic Hub namespace was intentionally nonexistent, so references that passed local validation were expected to fail later while trying to resolve a manifest.\n\nThat is useful here because the question was simply:\n\n```\nDoes Ollama reject the reference locally,\nor does it get far enough to try the registry?\n```\n\nThe observed split was:\n\n``` php\n79 -> no \"invalid model name\"\n80 -> no \"invalid model name\"\n81 -> HTTP 400 \"invalid model name\"\n85 -> HTTP 400 \"invalid model name\"\n```\n\nThat is why I think the 85-character repository name is a fairly strong explanation for this particular first error.\n\nIt still does **not** prove that the same GGUF will load and run correctly after the name problem is bypassed. Those are later layers.\n\n \n## \nOne additional HF/Ollama edge case you may run into after shortening the name\n\nThere is another currently open Ollama/Hugging Face integration issue that is worth separating from this one.\n\nIn the <=80-character test cases, Ollama got past local name validation but then hit:\n\n```\npull model manifest:\nrealm host \"huggingface.co\" does not match original host \"hf.co\"\n```\n\nThere is an open Ollama report for that behavior: [ollama/ollama#15661](https://github.com/ollama/ollama/issues/15661).\n\nThis is a **different layer** from the 80-character problem.\n\nHugging Face’s documentation explicitly says that both:\n\n```\nhf.co/...\n```\n\nand:\n\n```\nhuggingface.co/...\n```\n\ncan be used for Ollama references: [HF Ollama docs](https://huggingface.co/docs/hub/ollama).\n\nSo if a short repository name gets past `invalid model name` but then hits that particular realm-host error, I would try the full hostname:\n\n```\nollama run huggingface.co/your-account/qwen38-fcf-gguf:Q8_0\n```\n\nrather than:\n\n```\nollama run hf.co/your-account/qwen38-fcf-gguf:Q8_0\n```\n\nI would not combine the two errors into one diagnosis:\n\n```\n85-character model component\n        |\n        v\n\"invalid model name\"\n        |\n        | shorten repository name\n        v\nmanifest/auth stage\n        |\n        +--> possibly a separate hf.co / huggingface.co realm issue\n```\n\nSeeing a new error after shortening the name can therefore actually mean that you successfully got past the first problem.\n\n \n## \nA useful way to read whatever error comes next\n\nI would roughly separate the path like this:\n\n```\n1. model-reference parsing\n       |\n       +-- \"invalid model name\"\n       |\n       v\n2. manifest / tag resolution\n       |\n       +-- manifest/tag/auth/realm error\n       |\n       v\n3. GGUF download\n       |\n       v\n4. GGUF loading / architecture support\n       |\n       v\n5. template / renderer / runtime behavior\n```\n\nSo:\n\n**If it still immediately says `invalid model name`**\n\nThe reference itself is still being rejected. Check the actual parsed `namespace`, `model`, and `tag` lengths/characters first.\n\n**If it starts saying `pulling manifest`**\n\nThat is useful progress: the name/reference layer appears to have been passed. Any error after that should be investigated as a registry, tag, authentication, or manifest problem instead.\n\n**If the GGUF begins downloading**\n\nThen the identifier/manifest path has gone substantially further, and any later failure is more likely to belong to GGUF loading or architecture support.\n\n**If it loads but behaves incorrectly**\n\nThat becomes a separate runtime/template/renderer question. Hugging Face’s [GGUF documentation](https://huggingface.co/docs/hub/gguf) is useful background here, and the [Ollama/HF integration docs](https://huggingface.co/docs/hub/ollama) describe how the Hub can provide quantization selection, chat templates, parameters, etc.\n\nIn other words, I would avoid changing the model, quantization, template, and repository structure all at once. The short-repository test is attractive because it isolates the naming layer first.\n\n \nSo, at least from the error shown here, I don’t think you were simply using the Hugging Face Ollama syntax incorrectly. The most economical next step seems to be **keeping the same GGUF and giving the remote repository a short name**, or bypassing the remote naming layer with a local GGUF import.\n\nIf that changes the failure from `invalid model name` to a later-stage error, that would narrow the remaining problem quite a lot.", "url": "https://wpnews.pro/news/ollama-pull-error-invalid-model-name", "canonical_source": "https://discuss.huggingface.co/t/ollama-pull-error-invalid-model-name/179904#post_4", "published_at": "2026-09-17 21:28:59+00:00", "updated_at": "2026-09-17 21:54:22.359134+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-products"], "entities": ["Ollama", "Hugging Face", "Qwen3.8-27B-TURBO-Fable-Cold-Fusion-735-882-Heretic-Uncensored-NEO-CODER-MAX-MTP-GGUF", "DavidAU", "GGUF"], "alternates": {"html": "https://wpnews.pro/news/ollama-pull-error-invalid-model-name", "markdown": "https://wpnews.pro/news/ollama-pull-error-invalid-model-name.md", "text": "https://wpnews.pro/news/ollama-pull-error-invalid-model-name.txt", "jsonld": "https://wpnews.pro/news/ollama-pull-error-invalid-model-name.jsonld"}}