Atomic-Germ's picture
Q4NX/FastFlowLM card: flm-add.py install + run/serve flow, kernels source, model info
dcfcf69 verified
|
Raw
History Blame Contribute Delete
3.42 kB
metadata
license: apache-2.0
language:
  - en
pipeline_tag: text-generation
tags:
  - qwen2.5
  - agentic
  - heretic
  - uncensored
  - fastflowlm
  - q4nx
  - npu
base_model:
  - richardyoung/fable-qwen2.5-3b-agentic-merged-heretic

Qwen2.5-3B-Fable (Agentic/H eretic) - Q4NX for FastFlowLM (AMD Ryzen AI XDNA2)

Fable-Qwen2.5-3B, an agentic merged/heretic fine-tune of Qwen2.5-3B, converted to Q4NX for FastFlowLM. Runs on the Qwen2.5 engine (3B kernels).

What is Q4NX?

Q4NX is FastFlowLM's native packed-quantization format - a rearranged Q4_1 layout tuned for the NPU matrix engine's tile sizes and memory access patterns. It is not a GGUF file and it does not run on llama.cpp or Ollama; it is meant exclusively for the FastFlowLM engine on AMD Ryzen AI NPUs.

Requirements

  • FastFlowLM >= 0.9.45 (flm CLI)
  • AMD Ryzen AI processor with XDNA2 (NPU2) - Strix Point / Ryzen AI 300 series or later
  • Linux with the XRT NPU stack installed
  • ~8 GB of unified system memory (Q4NX weights + activations + KV cache)

Files

File Purpose
model.q4nx Quantized Q4NX weights
config.json FastFlowLM model configuration
tokenizer.json Tokenizer
tokenizer_config.json Special tokens and chat template
chat_template.jinja Chat template (optional)
flm-add.py Installer script - registers this model with FastFlowLM

Install and run

This repository ships flm-add.py, a small installer that copies the model into the FastFlowLM user directory and registers the tag qwen2.5-fable:3b. It never modifies the system FastFlowLM install.

# one-time environment (add these to ~/.bashrc)
export FLM_CONFIG_PATH="$HOME/.config/flm/model_list.json"
export FLM_XCLBIN_PATH="$HOME/.config/flm"

git lfs install
git clone https://huggingface.co/Atomic-Germ/Qwen2.5-3B-Fable-Agent-Heretic-NPU2
cd Qwen2.5-3B-Fable-Agent-Heretic-NPU2
python3 ./flm-add.py . 
flm run qwen2.5-fable:3b

Run python3 ./flm-add.py --help for all options. Without a clone, the same command works against the repo id directly:

python3 ./flm-add.py Atomic-Germ/Qwen2.5-3B-Fable-Agent-Heretic-NPU2 

Kernels

FastFlowLM's NPU kernels (xclbins) are closed source and are not shipped in this repository. flm-add.py links the kernels of the official qwen2.5-it:3b model (Qwen2.5-3B-Instruct-NPU2), because this model shares the same engine family (qwen2) and architecture.

Serve (OpenAI-compatible)

flm serve qwen2.5-fable:3b --port 8080
curl http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"qwen2.5-fable:3b","messages":[{"role":"user","content":"Hello!"}],"max_tokens":256}'

Model

Original model card

See the upstream model card for training details, benchmarks, and upstream usage. This repository only contains the Q4NX conversion for FastFlowLM.