Model page

MaziyarPanahi/phi-4-GGUF warn

No license declared — no usage rights by default; the chat template was dropped from its base model, which changes behavior; GGUF template ends turns with <|im_end|> but the file stops on <|endoftext|>. Plus 1 minor note.

downloads 179.0klikes 10license none declaredarch mistralupdated 2025-01-08

claims base: microsoft/phi-4 · chat template: not found · view on Hugging Face ↗

Scan coverageStatic battery2026-08-25Weights battery2026-08-25Behavioral batterynot rundetails
BatteryLooks atStatus
Static batteryMetadata & packagingcomplete 2026-08-25
Weights batteryWeights forensics — no GPU, no downloadcomplete 2026-08-25
Behavioral batteryLive-inference differentialsnot run

Ingot runs three batteries against a model. What each one checks →

Findings

Scanned 2026-08-25 · published from a community scan.

medium No license declared

The model card declares no license. You have no usage rights by default — treat as all-rights-reserved until the owner clarifies.

How to fix

Get a license from the owner or pick a licensed alternative — this is a legal gap, not a technical one.

  1. With no declared license you have no usage rights by default; treat the weights as all-rights-reserved.
  2. Open an issue or discussion on the repo asking the owner to declare a license, or use the licensed upstream/parent model instead.

medium Chat template dropped vs parent

microsoft/phi-4 ships a chat template; this repo does not. Serving stacks will silently fall back to a generic template, changing behavior. (In our 296-model census, 78% of pure quantization re-releases changed or dropped the template.)

How to fixingot patch

Restore the parent's chat template in `tokenizer_config.json` — a pure metadata fix.

  1. Run `ingot patch <owner/model>` — the patch manifest carries the parent's template and applies it to a local copy's `tokenizer_config.json`.
  2. Or fix by hand: copy the `chat_template` value from the parent repo's `tokenizer_config.json` into this model's, and pin your serving stack to that file.
  3. If the drift was intentional (the author retrained on a new template), confirm that in the model card before "fixing" it — restoring the parent template on retrained weights changes behavior too.

medium GGUF template ends turns with <|im_end|> but the file stops on <|endoftext|>

The embedded chat template terminates assistant turns with <|im_end|>, while tokenizer.ggml.eos_token_id points at <|endoftext|> (100257). llama.cpp-family runtimes stop on the metadata EOS, so generation runs past the terminator until the token budget is exhausted. Fix the eos_token_id in the GGUF metadata (gguf-py, no requant needed).

How to fixingot patch

Fix the GGUF's embedded metadata in place with gguf-py — template, EOS id, and pre-tokenizer are all metadata-editable; no requant needed.

  1. Template or EOS drift: copy the current values from the source repo and write them into the GGUF (`gguf_set_metadata.py` / gguf-py) — the tensor data is untouched.
  2. Missing pre-tokenizer type: reconvert with a current `convert_hf_to_gguf.py`, or set the correct `tokenizer.ggml.pre` for the architecture.
  3. Until the file is fixed, override at load time: llama.cpp `--override-kv tokenizer.ggml.eos_token_id=int:<id>` and `--chat-template-file <fixed.jinja>`.
  4. Prefer a re-upload from the quantizer once the source repo's fix lands — already-downloaded GGUFs never pick up upstream fixes on their own.

low GGUF chat template differs from the source repo's

The template embedded at conversion time (377 chars) no longer matches the source repo's current template (462 chars). Source-repo template fixes never propagate into converted GGUFs — 43% of popular GGUF repos drift this way, including quants that resurrect already-fixed launch bugs. Diff the two before deploying; re-embed with gguf-py if the source's fix matters.

How to fixingot patch

Fix the GGUF's embedded metadata in place with gguf-py — template, EOS id, and pre-tokenizer are all metadata-editable; no requant needed.

  1. Template or EOS drift: copy the current values from the source repo and write them into the GGUF (`gguf_set_metadata.py` / gguf-py) — the tensor data is untouched.
  2. Missing pre-tokenizer type: reconvert with a current `convert_hf_to_gguf.py`, or set the correct `tokenizer.ggml.pre` for the architecture.
  3. Until the file is fixed, override at load time: llama.cpp `--override-kv tokenizer.ggml.eos_token_id=int:<id>` and `--chat-template-file <fixed.jinja>`.
  4. Prefer a re-upload from the quantizer once the source repo's fix lands — already-downloaded GGUFs never pick up upstream fixes on their own.

Fix it

Some findings are metadata-level and patchable — apply the fixes to your local copy (your weights never leave your machine):

npx @ingotai/scan patch MaziyarPanahi/phi-4-GGUF

Remediation guidance addresses the documented findings only. It is evidence-driven repair, not a safety certification of the model.

Fingerprint

The durable profile of this model: measured weights-and-metadata facts, rebuilt on every scan and battery run. Updated 2026-08-25.

architecturemistral
licensenone declared
serializationgguf
chat templatenone
claimed lineagemicrosoft/phi-4
lineage verifiedunverified — weights battery pending
Full measured fingerprint
pipelinetext-generation
repo files14
revision7b3c692e11c2
HF snapshot179.0k downloads · 10 likes · updated 2025-01-08 · captured 2026-08-25
Battery runs (1)the run trace behind the findings — what each job measured
batterystatusqueueddurationattempts
weightscomplete2026-08-25 19:232s1
weights run 2026-08-25 measurements
probes rungguf-metadata

Verdict badge

Ship the verdict in your README — it always shows the latest published analysis:

Ingot verdict: warn

[![Ingot scan](https://ingot.tools/api/v1/models/MaziyarPanahi/phi-4-GGUF/badge.svg)](https://ingot.tools/models/MaziyarPanahi/phi-4-GGUF)
Gate it in CI