Skip to main content

flm-add

Install a pre-converted FLM (Q4NX) model and register it with FastFlowLM.

Installation

uv tool install flm-add    # recommended, uses uv + PEP 723 inline script
pip install flm-add        # also works via pip
# or from source:
git clone https://github.com/atomic-germ/Q4NX_Converter.git cd Q4NX_Converter && \
uv tool install . --force || pip install -e .

Usage

From a Hugging Face repo (recommended)

flm-add Atomic-Germ/Qwen3.5-9B-Claude-4.8-Opus-NPU2 --tag qwen3.5-claude:9b

The --tag argument must match the entry in FastFlowLM's model registry (e.g., qwen3.5-claude:9b, gptoss-distill:20b). Run flm-add --help to see all options.

From a ModelScope repo

Hugging Face is the default hub; pass --modelscope for a bare repo id, or just paste a ModelScope URL and it is detected automatically:

flm-add --modelscope Atomic-Germ/Ornith-1.0-9B-NPU2 --family qwen3.5
flm-add https://www.modelscope.ai/models/Atomic-Germ/Ornith-1.0-9B-NPU2 --family qwen3.5

Both the international hub (modelscope.ai) and the original one (modelscope.cn) are queried, and downloads are size- and sha256-verified like the Hugging Face path. A local ModelScope SDK cache (~/.cache/modelscope) is used when present.

From a local checkout

If you've already cloned or downloaded a repo containing the required files (config.json, model.q4nx, tokenizer.json, tokenizer_config.json), and optionally chat_template.jinja:

cd ~/repos/Atomic-Germ-Qwen3_5-9B-Claude-4_8-Opus-NPU2
flm-add . --tag qwen3.5-claude:9b

From a directory (no repo URL)

If you just want to install from an existing folder with the model files:

cd ~/models/Qwen3.5-9B-Claude-4.8-Opus-NPU2
flm-add . --tag qwen3.5-claude:9b

How It Works

flm-add:

  1. Reads config.json from the target model directory to extract metadata (family, engine, size, context length).
  2. Validates that all required files exist (model.q4nx, tokenizer.json, etc.).
  3. Writes a user-level registry at $FLM_CONFIG_PATH/model_list.json (default: ~/.config/flm/model_list.json).
  4. Adds a symlink into $FLM_XCLBIN_PATH/xclbins/ pointing to the model's kernel folder (model.q4nx.xbin). The xclbin directory name is taken from the matching official FastFlowLM entry, keyed by family and size (e.g., Darwin-36B-Opus-NPU2 -> Qwen3.6-35B-A3B-NPU2). Custom FLM models never ship xclbins because they are closed source binaries; the kernel symlink always comes from the official model it matches.

What This Project Is (and Isn't)

This repo contains only flm-add, a minimal, dependency-free Python tool for installing pre-converted Q4NX models into FastFlowLM. It does not include:

  • A converter (convert.py) — that lives upstream in the AMD project.
  • The q4nx/ conversion library or its model-specific implementations.
  • Configuration files under a configs/ directory (those belong to the converter, not flm-add).

Project Structure

flm_add/          # Installable Python package (stdlib-only)
├── __init__.py    # Core logic: registry writing, symlink creation
└── __main__.py    # CLI entry point (argparse → flm_add.main())

flm-add.py        # Standalone shim; delegates to flm_add.main()

dist/              # Wheel + sdist after `uv build`
  └── .gitignore   # Ignore built artifacts in the repo

License

Apache-2.0 — see LICENSE.

Metadata

Release files for flm-add 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flm-add 0.2.0
File Size Uploaded Provenance Actions
flm_add-0.2.0.tar.gz 16.8 kB Without provenance Details for flm_add-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flm-add 0.2.0
File Interpreter ABI Platform Actions
flm_add-0.2.0-py3-none-any.whl Python 3 none any Details for flm_add-0.2.0-py3-none-any.whl

Total release size: 32.9 kB

Release files / flm_add-0.2.0.tar.gz

Download URL flm_add-0.2.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ed74c090e567892d015c8ef5cb35c54dd16f2ed855658bdc06dacf7ad2138802
BLAKE2b-256 checksum
How to use checksums
97c13fb04d7b727af765c9b30bdf10e3ffc83f053f74db7bc8bb8b86bc4ba2c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"46","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / flm_add-0.2.0-py3-none-any.whl

Download URL flm_add-0.2.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
593ab4be1ac27556aac874aef9a340e147f147a6aa615a4929260982bdb1fb44
BLAKE2b-256 checksum
How to use checksums
37a7dadf57ec9f0e0601c176e990b62227a2bc2e24b9d11335068108a828e144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"46","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for flm-add 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page