# LFM2.5 Hermes Tool-Trace LoRA Run Report ## Outcome Completed a local MLX LoRA fine-tune for `LiquidAI/LFM2.5-8B-A1B-MLX-bf16` on Hermes-style tool traces. The final adapter reloads, the fused MLX checkpoint loads, and the fixed mini-suite shows a small tool-format improvement over the baseline GGUF server. GGUF export is blocked in `mlx-lm` for this architecture: ```text ValueError: Model type lfm2_moe not supported for GGUF conversion. ``` ## Environment - `mlx`: 0.31.2 - `mlx-lm`: 0.31.3 - `datasets`: 4.8.5 - `transformers`: 5.9.0 - `huggingface_hub`: 1.17.0 - Python: `/opt/homebrew/bin/python3` via `lfm25_hermes_ft/venv` ## Dataset Source dataset: `DJLougen/hermes-agent-traces-filtered`, `default/train`. Initial 16K artifact: - Input rows: 3,679 - Accepted rows at 16K cap: 1,583 - Split: 1,431 train, 90 valid, 62 test - Rejected as over 16K: 2,077 - Rejected as malformed/unbalanced: 19 The requested 16K training pass was attempted and failed with Metal OOM. A deterministic 12K view was created from the accepted 16K artifact: - Train: 880 kept, 551 dropped from 16K artifact - Valid: 47 kept, 43 dropped from 16K artifact - Test: 36 kept, 26 dropped from 16K artifact ## Training Final training config: - Model: `LiquidAI/LFM2.5-8B-A1B-MLX-bf16` - Data: `lfm25_hermes_ft/datasets/hermes_filtered_text_12k` - LoRA rank: 16 - LoRA layers: 16 - Batch size: 1 - Gradient accumulation: 1 - Max sequence length: 12,000 - Iterations: 880 - Learning rate: `1e-5` - Validation batches: 1 - Gradient checkpointing: enabled - Seed: 42 Final training line: ```text Iter 880: Val loss 0.465, Train loss 0.278, Tokens/sec 974.875, Trained Tokens 7501092, Peak mem 50.948 GB ``` ## Evaluation Fixed six-case Hermes mini-suite: - Single weather tool call - Web search tool call - Calculator tool call - Tool-response finalization - No-tool natural response - Malformed-tool robustness Results: | Lane | Passed | Parseable tool calls | | --- | ---: | ---: | | Baseline GGUF server | 3 / 6 | 0 | | MLX LoRA adapter | 4 / 6 | 1 | The adapter produced a valid Hermes XML/JSON tool call for the web-search case: ```xml {"name": "web_search", "arguments": {"query": "Liquid AI LFM2.5 release notes"}} ``` It did not yet reliably force tool calls for weather or calculator prompts. ## Artifacts - Final adapter: `lfm25_hermes_ft/checkpoints/hermes_lora_r16_12k/adapters.safetensors` - Adapter checkpoints: `lfm25_hermes_ft/checkpoints/hermes_lora_r16_12k/0000100_adapters.safetensors` through `0000800_adapters.safetensors` - Fused MLX checkpoint: `lfm25_hermes_ft/artifacts/hermes_lora_r16_12k_fused_mlx` - Eval JSON: `lfm25_hermes_ft/evals/hermes_tool_eval.json` - Training log: `lfm25_hermes_ft/logs/train_lora.log` - GGUF blocker log: `lfm25_hermes_ft/logs/fuse_export_gguf.log` - OOM evidence: - `lfm25_hermes_ft/logs/train_lora_oom_val4_with_server.log` - `lfm25_hermes_ft/logs/train_lora_oom_val1_no_server.log` - `lfm25_hermes_ft/logs/train_lora_oom_gradaccum1_no_server.log` ## Status This run is useful as a retained MLX adapter/fused checkpoint, but it is not llama.cpp-ready because GGUF export for `lfm2_moe` is unsupported by the installed `mlx-lm` exporter.