Skip to content

rewrite flm-add in cpp as flm add - #34

Closed
Atomic-Germ wants to merge 3 commits into
mainfrom
oflm-add
Closed

Atomic-Germ wants to merge 3 commits into
mainfrom
oflm-add

Conversation

@Atomic-Germ

@Atomic-Germ Atomic-Germ commented Sep 8, 2026

Copy link
Copy Markdown
Owner

This addresses #29 ; needs extensive testing on different systems -- not sure if flm pull should be outright replaced yet. This will need quite a bit done when gguf hits but that's alright.

./flm add Atomic-Germ/Ornith1.5-Heretic-9B-NPU2 --family qwen3.5
[FLM]  Using custom model list path: /home/atomic-germ/.config/flm/model_list.json
[INFO] Downloading model files from Hugging Face: Atomic-Germ/Ornith1.5-Heretic-9B-NPU2
[INFO] Downloading config.json...
[FLM]  Download completed: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/config.json
[INFO] Downloading model.q4nx...
[FLM]  Download completed: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/model.q4nx
[INFO] Downloading tokenizer.json...
[FLM]  Download completed: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/tokenizer.json
[INFO] Downloading tokenizer_config.json...
[FLM]  Download completed: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/tokenizer_config.json
[INFO] Downloading chat_template.jinja...
[FLM]  Download completed: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/chat_template.jinja
[INFO] Downloading vision_weight.q4nx...
[FLM]  Download completed: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/vision_weight.q4nx
[INFO] Registered tag 'ornith1.5-heretic:9b' in /home/atomic-germ/.config/flm/model_list.json
[INFO] Linked open_kernels: /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2/open_kernels -> /home/atomic-germ/.config/flm/xclbins/Qwen3-4B-i1-GGUF/open_kernels

Done: Ornith1.5-Heretic-9B-NPU2 installed to /home/atomic-germ/.config/flm/models/Ornith1.5-Heretic-9B-NPU2
Run:  flm run ornith1.5-heretic:9b   (or: flm serve ornith1.5-heretic:9b)

@Cyronius

Cyronius commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

We also have to think .. if we are supporting gguf, then hugging face standard formats and everything else become a possibility. I'm not sure what the future of this is, but good for now.

@Cyronius
Cyronius self-requested a review September 8, 2026 23:42
bool add_thinking = false;           // --thinking  -> details.think
bool add_think_toggleable = false;   // --think-toggleable -> details.think_toggleable
std::string add_parameter_size = ""; // --parameter-size -> details.parameter_size
std::string add_quantization = "";   // --quantization -> details.quantization_level
int add_context_length = -1;         // --context-length -> default_context_length
int add_max_prefill = -1;            // --max-prefill -> max_prefill_len
std::string add_label = "";          // --label (comma-separated) -> label[]
bool add_list_families = false;      // --list-families -> list available family open_kernels
@Atomic-Germ

Copy link
Copy Markdown
Owner Author

We also have to think .. if we are supporting gguf, then hugging face standard formats and everything else become a possibility. I'm not sure what the future of this is, but good for now.

@Cyronius - I've had that on my mind for a while now; I think that will be the single most powerful thing we can bring to this, and it'll be sooner rather than later I think.

@Atomic-Germ
Atomic-Germ requested a review from Cyronius September 8, 2026 23:59
@Atomic-Germ Atomic-Germ mentioned this pull request Sep 9, 2026
5 tasks
@Atomic-Germ Atomic-Germ self-assigned this Sep 14, 2026
@Atomic-Germ Atomic-Germ added the enhancement New feature or request label Sep 14, 2026
@Atomic-Germ Atomic-Germ linked an issue Sep 14, 2026 that may be closed by this pull request
vegah added a commit to vegah/OpenFlowLM-Next that referenced this pull request Sep 14, 2026
…odel_info.json

Scope is now only which models the application knows and where they are.
Kernel lookup, the Python oflm-add and q4nx-build changes, and the history
path are reverted to main: Atomic-Germ#34 replaces oflm-add with `oflm add`, which
links fine-tunes to their family's open kernels and needs no per-name
xclbin lookup.

Added what Atomic-Germ#34 needs to work without exports: registry_directories()
includes OFLM_MODEL_PATH, where `oflm add` writes model_list.json and
model_info.json, and find_model_infos() / model_registry::load_model_info()
merge user model_info.json files over the shipped one by tag (a user file
never replaces a shipped tag's hashes). The downloader reads the merged
file at all three call sites.

Tests: user_dirs_test, 64 checks on MSVC and 62 on g++ 13 / C++20; the
three model_info rules were each seen to fail with their fix disabled.
With no OFLM_CONFIG_PATH and OFLM_MODEL_PATH laid out the way `oflm add`
writes it, `oflm check <tag>` verifies every file; without that
model_info.json it fails with `key '<tag>' not found`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Atomic-Germ

Copy link
Copy Markdown
Owner Author

Superceded by #86

@Atomic-Germ
Atomic-Germ deleted the oflm-add branch September 15, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP error body is saved as the model file and reported as a successful download Replace Hard-Coded Model List

2 participants