Instructions to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF", filename="FastContext-1.0-4B-SFT-ROCmFP4-COHERENT-embF16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: ./llama-cli -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Use Docker
docker model run hf.co/plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
- LM Studio
- Jan
- Ollama
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with Ollama:
ollama run hf.co/plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
- Unsloth Studio
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF to start chatting
- Pi
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with Docker Model Runner:
docker model run hf.co/plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
- Lemonade
How to use plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF:BF16
Run and chat with the model
lemonade run user.FastContext-1.0-4B-SFT-ROCmFP4-GGUF-BF16
List all available models
lemonade list
▗▇▇▇▇▇▇▇▖
▗█▘▝██████▖
▗▛ ▝██████▆▆▆▆▆▆▆▆▆▆▅
▟▛ ▗█████████████████▙▖
▄▄▄▄▄▟▛ ▟████████████████████▖
▗██▌ ▚▖ ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔█▘
▗████▖ ▜▖ ▗█▘
▜█████▙ ▜▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▀▀▀▀▀▜▙
▜█████▙ ▝████████████▛ ▜▙
▜█████▙ ▝██████████▛ ▃ ▜▙
▀█████▙▖ ▝████████▘ ▟█▙ ▀▙
▝██████▖ ▝▜█████▘ ▟███▙▂▂▂▂▐█
▟███████▖ ▜███▘ ▗███████████▛
▟█████████▄ ▜▛ ▗███████████▀
▝█████▀ ▗▛ ▗██████▀▀▀▀▀▘
▜██▘ ▗▛ ▟█████▛▘
▜█▇▇▇▇▇▇▇▇▇█▖ ▟█████▛
▝█▖ ▟█████▛
▝███████▀
██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ████████████████████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████ ██████████████
FORMAT ROCmFP4 4-BIT |
PRECISION ~4.5 BPW |
ARCH QWEN3 DENSE |
CONTEXT 256 K |
PARAMS 4B DENSE |
DRAFT NO MTP |
BACKEND VULKAN0 |
LICENSE MIT |
The custom
q4_0_rocmfp4 / q4_0_rocmfp4_fast tensor types will not load in stock llama.cpp, LM Studio, or Ollama. Build/run with charlie12345/rocmfp4-llama · branch mtp-rocmfp4-strix.
Experimental AMD Strix Halo (gfx1151) quant of microsoft/FastContext-1.0-4B-SFT — Microsoft's repository-exploration subagent for coding agents. Instead of one model both exploring the repo and solving the task, FastContext is invoked on demand by a main agent, fires parallel read-only tool calls (READ / GLOB / GREP), and returns compact file paths + line ranges as focused context. Architecturally it's a plain Qwen3 dense 4B (Qwen3ForCausalLM, 36 layers, hidden 2560, 256K context, MIT-licensed), here in the custom ROCmFP4 4-bit format, imatrix-quantized.
Both share genuine f16 embeddings (from BF16) + the code-weighted imatrix (see §04). The COHERENT build (★) puts every body tensor on the dual-scale q4_0_rocmfp4 kernel — lowest measured KL vs the BF16 reference at ~the same decode speed — vs the STRIX build's faster single-scale q4_0_rocmfp4_fast bulk. The Qwen (ChatML) chat template is baked into the GGUF — just pass --jinja.
tie_word_embeddings=True, so there's no separate output head — the token-embedding tensor doubles as the lm-head. Setting --token-embedding-type f16 therefore gives an f16 embedding and f16 output head in one (no headQ6 variant needed — f16 already beats Q6 there).
Run from the folder holding the .gguf (the Qwen ChatML template is baked in — just pass --jinja):
env HSA_OVERRIDE_GFX_VERSION=11.5.1 GGML_HIP_ENABLE_UNIFIED_MEMORY=1 \
llama-server \
-m FastContext-1.0-4B-SFT-ROCmFP4-COHERENT-embF16.gguf \
--alias fastcontext-4b \
--host 0.0.0.0 \
--port 8080 \
-c 262144 \
-ctk f16 \
-ctv f16 \
--temp 0.7 \
--top-p 0.8 \
--top-k 20 \
-dev Vulkan0 \
-ngl 999 \
-fa on \
-b 2048 \
-ub 256 \
-t 16 \
-tb 16 \
-cpent 256 \
-ctxcp 32 \
--cache-reuse 256 \
--cache-ram 65536 \
--jinja \
--parallel 1 \
--metrics \
--no-mmap
--spec-* / --spec-type draft-mtp flags — this arch has no MTP head (see §04). It's already fast on its own.
FastContext isn't a general chat model — it's a repository-exploration subagent meant to be called by your main coding agent, not driven directly. The intended loop: the main agent delegates "find the relevant context for X" → FastContext issues parallel read-only tool calls (READ, GLOB, GREP) → returns compact file paths + line ranges, which the main agent folds into its own context to do the actual work. The point is to keep repo-exploration tokens out of the main agent's window.
- Chat template: Qwen (ChatML) is baked into the GGUF — just pass
--jinja. - Tool calling: it emits structured
READ/GLOB/GREPcalls — wire those tools into your harness and use a Qwen/Hermes-style tool-call parser so they're parsed rather than printed. See the upstream model card for the exact subagent protocol + tool schema (it expects a specific invocation format). - Sampling: temp
0.7, top-p0.8, top-k20(Qwen3 instruct defaults) — already set in §02.
--cache-reuse / --cache-ram) keeps repeated exploration over the same repo cheap.
Recommended build = COHERENT (we measured it). Both builds use f16 tied emb/head + the same imatrix; the lever swept here is the body kernel, ranked by KL divergence vs the true BF16 on held-out code (lower = more faithful). The all-dual-scale body (COHERENT) beats the fast-body STRIX build on every metric at ~the same decode speed:
A clean sweep: COHERENT is lower on mean KLD (−13%), median KLD (−6%), RMS Δp (6.43% vs 6.95%), and perplexity (4.192 vs 4.213), and higher on same-top-token (+0.70 pp) — every metric, same direction (BF16 reference PPL 4.074). So it's the default; STRIX stays as a marginally smaller/faster fallback.
Fast on its own. ~68 t/s short-context decode on a Ryzen AI Max+ 395 (Vulkan0, measured llama-bench tg128). It's a 4B dense Qwen3 with no MTP head, so there's no speculative decoding — it doesn't need it, and at 4B it's a cheap explorer you can run several of in parallel.
groups_merged + froggeric code/technical, via froggeric/imatrix), computed on this model's BF16. We measured the COHERENT-vs-STRIX comparison above (both imatrix); we did not run a separate imatrix-vs-no-imatrix ablation on this model. Scope: the KL/PPL figures are a fidelity-vs-BF16 measurement on a held-out code slice, not an absolute coding benchmark.
# 0) convert the safetensors -> BF16 GGUF (plain qwen3 dense; no MTP, tied embeddings)
python convert_hf_to_gguf.py FastContext-1.0-4B-SFT/ --outtype bf16 --outfile FastContext-1.0-4B-SFT-BF16.gguf
# 1) imatrix on the BF16 (general+code: Kalomaze groups_merged + froggeric code/technical)
llama-imatrix -m FastContext-1.0-4B-SFT-BF16.gguf -f general+code-calib.txt -o fastcontext-4b.imatrix -c 512 -ngl 999
# 2) RECOMMENDED: COHERENT all-dual body + f16 tied emb/head (the ★ file) — lowest KL (§04).
# tie_word_embeddings=True -> --token-embedding-type f16 also gives an f16 output head; no --output-tensor-type.
llama-quantize --token-embedding-type f16 --imatrix fastcontext-4b.imatrix \
FastContext-1.0-4B-SFT-BF16.gguf FastContext-1.0-4B-SFT-ROCmFP4-COHERENT-embF16.gguf Q4_0_ROCMFP4_COHERENT
# fast-body STRIX fallback (same f16 emb + imatrix)
llama-quantize --token-embedding-type f16 --imatrix fastcontext-4b.imatrix \
FastContext-1.0-4B-SFT-BF16.gguf FastContext-1.0-4B-SFT-ROCmFP4-STRIX-embF16-imatrix.gguf Q4_0_ROCMFP4_STRIX
Experimental research build for AMD Strix Halo — hardware/driver/prompt-sensitive, may not reproduce elsewhere. Not native FP4 tensor-core execution.
Derivative quantization — verify the base model's license before redistribution / use.
- Downloads last month
- -
16-bit
Model tree for plunderstruck/FastContext-1.0-4B-SFT-ROCmFP4-GGUF
Base model
Qwen/Qwen3-4B-Instruct-2507