# Ollama Modelfile for SASVAAI/muse-glimmer-30b-kernelgen # # The Q4_K_M GGUF ships in this repo, so this file works as-is: # # hf download SASVAAI/muse-glimmer-30b-kernelgen \ # --include "*Q4_K_M.gguf" "Modelfile" --local-dir . # ollama create muse-glimmer-kernelgen -f Modelfile # # You do not need this file to use `ollama run hf.co/SASVAAI/...` — that path # reads the repo's `params` and `system` files instead (Ollama never fetches a # Modelfile). Both are kept in sync with the values below, and that equivalence # was checked by content address: `ollama create` deduplicated the `system` file # against the layer built from the SYSTEM block below (sha256:7b242b2c...). # The chat template comes from the GGUF either way — Ollama v0.34.0 renders the # embedded Jinja and ignores any Go TEMPLATE, measured 2026-09-15. # # Point FROM at a different quantisation if you build your own. FROM ./muse-glimmer-30b-kernelgen-Q4_K_M.gguf # --- Decoding ------------------------------------------------------------- # Greedy. The base repo's generation_config.json ships sampling defaults # (temperature 1.0 / top_k 64 / top_p 0.95) inherited from the base model; # those are wrong for this task, which has one correct answer shape. Ollama # treats temperature 0 as greedy. PARAMETER temperature 0 PARAMETER top_k 1 PARAMETER num_predict 2048 # Training used MAX_SEQ_LEN=8192; 99.3% of train and 98.9% of val rows fit it. # Load-bearing: without it Ollama picks the base model's default_num_ctx of # 262144 and allocates a KV cache to match. PARAMETER num_ctx 8192 # --- CPU threads (uncomment if you run on CPU) ---------------------------- # Ollama defaults to every logical core. On a many-core shared host that is # much slower than using a subset: measured 2026-09-14 on a 192-core box under # contention, the default took >17 min for one 469-token reply (~0.45 tok/s) # where 48 threads took 66 s (9.52 tok/s). Set this to roughly your physical # core count, or the cores you actually have to yourself. Irrelevant on GPU. # PARAMETER num_thread 48 # --- Stop tokens ---------------------------------------------------------- # The merged model's generation_config.json lists eos_token_id [200001, 200008] # = <|end_of_text|> and <|eot|>. The ATEM chat template ends assistant turns # with <|eot|>. PARAMETER stop "<|eot|>" PARAMETER stop "<|end_of_text|>" # --- System prompt -------------------------------------------------------- # Verbatim the prompt this adapter was trained under, recovered from the # torchrun launch command logged for checkpoint exp_20260912_001239. Changing # it moves the model off its trained contract. SYSTEM """You are a GPU kernel engineer. Given a specification (either a PyTorch nn.Module to port or a custom_kernel signature with reference implementation), write a complete, correct, and fast Python source file using Triton @triton.jit kernels with appropriate host-side launcher code, preserving the exact public class name and forward signature or custom_kernel entry point as specified. Output only raw Python source code with no explanation or markdown."""