How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf madscience75/LFM3-AA1o:
# Run inference directly in the terminal:
llama cli -hf madscience75/LFM3-AA1o:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf madscience75/LFM3-AA1o:
# Run inference directly in the terminal:
llama cli -hf madscience75/LFM3-AA1o:
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf madscience75/LFM3-AA1o:
# Run inference directly in the terminal:
./build/bin/llama cli -hf madscience75/LFM3-AA1o:
Use Docker
docker model run hf.co/madscience75/LFM3-AA1o:
Quick Links

LFM3-AA1o (LFM3 Abreviated Answer Omni)

LFM3-AA1o (LFM3 Abreviated Answer Omni) combines the multimodal vision, audio, video, and speech capabilities of LiquidAI/LFM3-Omni-2B with the abliteration and compressed reasoning of madscience75/LFM3-AA1.

Starting from a task-vector initialization Omni + (LFM3-AA1 - LiquidAI/LFM3-1.7B) (preserving Omni's multimodal special token embeddings >= 125000, vision tower, audio encoder, projectors, and audio-output depth decoder), we ran a 2-stage LoRA alignment (r=16, targeted strictly to model.language_model.layers.*): 2 epochs SFT warmup on 126 oracle-verified concise reasoning traces followed by 2 epochs pure-DPO (beta=0.1, 56 pairs).

LFM3-AA1o supports text, image, audio, video, and /v1/realtime speech in a single unified model, achieves 23/24 on dev_eval (0 caps, -63.9% reasoning tokens vs. Heretic baseline), 22/24 (BF16) / 21/24 (Q8_0) on final_holdout_locked (-56.3% to -57.0% reasoning tokens), and 0/2 refusals on abliteration spot-checks.


Available Formats & SHA256 Checksums

Artifact Format Size SHA256
model.safetensors (download) BF16 Safetensors 4.1 GiB 2fab686ffacb3ddc9535260cb21bb4002eabfc9426cb30c5210944d097023bc0
LFM3-AA1o-BF16.gguf (download) BF16 GGUF 3.3 GiB 11aa3364b0074aecfa20ef3c49de58ff64c73b80aa0edeba05e4d6d8aba86c7c
LFM3-AA1o-Q8_0.gguf (download) Q8_0 GGUF 1.8 GiB 257822445148bb4a377ff7503d7bc150aa7a69cb39047553bcd03d126ed109fe
LFM3-AA1o-IQ4_XS.gguf (download) IQ4_XS GGUF (imatrix, 4.61 BPW) 958 MiB 59d447359a4f2613ee3ef3d984c7632d78a0067c1c8bafed66c7837b1fcf9ca6
mmproj-LFM3-AA1o-BF16.gguf (download) Multimodal Projector (Vision + Audio + Depth) 906 MiB 74dc5e78374d1be19b48c8a947fd4617f17c18c1bd40e7c47d2557b4ca72d238

All model files are hosted in the madscience75/LFM3-AA1o file tree.


Benchmark Comparisons (Stock vs. Heretic vs. LFM3-AA1 vs. LFM3-AA1o)

1. Standard Math Benchmarks (Kaggle 2ร—T4, BF16, do_sample=False, max_new_tokens=2048)

Evaluated with aa1_std_bench.py / aa1o_std_bench.py on the first 100 problems of GSM8K (openai/gsm8k, test) and MATH-500 (HuggingFaceH4/MATH-500, test).

Model GSM8K Pass GSM8K Caps GSM8K Mean / Med rtok MATH-500 Pass MATH-500 Caps MATH-500 Mean / Med rtok
LiquidAI/LFM3-1.7B (Stock) 92/100 (92.0%) 4 603.4 / 392.5 69/100 (69.0%) 24 889.9 / 594.5
Peymandc/LFM3-1.7B-Heretic-Uncensored (Base) 88/100 (88.0%) 8 711.2 / 457.5 60/100 (60.0%) 36 1064.2 / 771.0
LFM3-AA1 (Text-Only, BF16) 91/100 (91.0%) 2 493.3 / 345.0 66/100 (66.0%) 29 926.3 / 535.0
LFM3-AA1o (Omni, BF16) 80/100 (80.0%) 1 293.6 / 230.0 57/100 (57.0%) 4 0.0 / 0.0

(Note: On MATH-500, LFM3-AA1o retained Omni's direct-answer behavior under the MATH-500 prompt, resulting in 0.0 median reasoning tokens and only 4 caps vs. 36 on Base; on GSM8K it used -58.7% fewer mean reasoning tokens than Base and -40.5% fewer than LFM3-AA1. The 5-prompt tool_calling check scored 0/5 across all models due to harness formatting expecting OpenAI JSON rather than LFM3's native <|tool_call_start|>[...]<|tool_call_end|> syntax.)


2. Locked Holdout Suite (final_holdout_locked.json, 24 Oracle-Verified Tasks)

Evaluated across 4 task families (math_seq, schedule_time, state_ops, prefix_recovery) with max_new_tokens=4096.

Model / Quant Pass Caps Total Reasoning Tokens Aggregate rtok Delta vs. Base Median rtok
Base Heretic-Uncensored (BF16) 24/24 0 35,974 โ€” โ€”
LFM3-AA1 (BF16.gguf) 24/24 0 20,514 -42.98% -39.52%
LFM3-AA1 (Q8_0.gguf) 24/24 0 20,258 -43.69% -42.98%
LFM3-AA1 (IQ4_XS.gguf) 22/24 0 25,402 -29.39% -24.96%
LFM3-AA1o (BF16.gguf) 22/24 1 15,706 -56.34% 570.5
LFM3-AA1o (Q8_0.gguf) 21/24 1 15,474 -56.99% 547.0
LFM3-AA1o (IQ4_XS.gguf) 19/24 1 16,321 -54.63% 593.5

3. Dev Eval Suite (dev_eval_tasks.json, 24 Oracle-Verified Tasks)

Model Pass Caps Total Reasoning Tokens
Base Heretic-Uncensored (BF16) 22/24 0 32,861 (30,516 passing)
LFM3-AA1 (BF16) 22/24 0 19,243 (17,958 passing)
LFM3-AA1o (BF16) 23/24 0 11,858 (-63.9% vs. Base)

4. Paired Local Agentic Suite (Q8_0, 4096 Total Tokens / Run)

Model (Q8_0) Rubric Score Full Pass Total Tokens Caps Breakdown (clamp / schedule / follow_pointer)
Base Heretic-Uncensored 9/12 0/3 7,377 1 3/4 cap 4096 / 3/4 2443 tok / 3/4 838 tok
LFM3-AA1 10/12 1/3 5,025 0 4/4 915 tok / 3/4 3294 tok / 3/4 816 tok
LFM3-AA1o 5/12 0/3 4,384 1 2/4 132 tok / 0/4 cap 4096 / 3/4 156 tok

5. Multimodal & Abliteration Verification (Q8_0 + mmproj-BF16)

Verified via llama-mtmd-cli and llama-server:

  • Image (--image lfm3-omni-architecture-light.png): Accurately described the LFM3-Omni architecture diagram and its three parallel encoder branches.
  • Audio (--audio test-2.mp3): Accurately identified the male narrator speaking about the New York Times and the moon landing.
  • Video + Soundtrack (--video test-3.mp4): Accurately described the comedic office scene and physical action.
  • Abliteration Spot-Check (abliteration_spotcheck.json): 0/2 refusals (refused: false on both prompts).

Exact Reproducible Recipe

  1. Delta Initialization (merge_aa1o.py):
    • Computed ฮ” = LFM3-AA1 - LiquidAI/LFM3-1.7B and added it (alpha = 1.0) to LiquidAI/LFM3-Omni-2B's model.language_model.* (286 tensors), keeping embed_tokens[125000:] (Omni multimodal special tokens), vision_tower, audio_encoder, projectors, and depth_decoder untouched.
    • Patched chat_template.jinja so enable_thinking defaults to true.
  2. 2-Stage LoRA Alignment (aa1o_phase2_trainer.py):
    • LoRA Config: r=16, lora_alpha=32, lora_dropout=0.05, target_modules=r"model\.language_model\.layers\.\d+\.(self_attn\.(q_proj|k_proj|v_proj|o_proj)|feed_forward\.(w1|w2|w3))" (leaving all vision/audio/projector/depth modules frozen).
    • Stage 1 (SFT Warmup): 2 epochs on all 126 oracle-verified chosen traces from dpo_pairs.json (lr=1e-4, grad_accum=8, max_len=1536) to replace Omni's </think> 0-token habit with structured thinking.
    • Stage 2 (DPO Compression): 2 epochs pure-DPO on 56 preference pairs (beta=0.1, lr=5e-5, grad_accum=8, max_len=1536).
  3. GGUF & Multimodal Projector Export (llama.cpp b1b770d90):
    python convert_hf_to_gguf.py merged_model --outfile LFM3-AA1o-BF16.gguf --outtype bf16
    python convert_hf_to_gguf.py merged_model --mmproj --outfile mmproj-LFM3-AA1o-BF16.gguf --outtype bf16
    llama-quantize LFM3-AA1o-BF16.gguf LFM3-AA1o-Q8_0.gguf Q8_0
    llama-imatrix -m LFM3-AA1o-BF16.gguf -f imatrix_calib.txt -o imatrix.dat --chunks 64
    llama-quantize --imatrix imatrix.dat LFM3-AA1o-BF16.gguf LFM3-AA1o-IQ4_XS.gguf IQ4_XS
    

Usage (llama-server with Multimodal & /v1/realtime Speech)

llama-server \
  -m LFM3-AA1o-Q8_0.gguf \
  --mmproj mmproj-LFM3-AA1o-BF16.gguf \
  --alias lfm-aa1o \
  --ctx-size 32768 \
  --jinja

Loading --mmproj mmproj-LFM3-AA1o-BF16.gguf enables /v1/chat/completions (text, image, audio, video) as well as the WebSocket /v1/realtime speech conversation endpoint automatically.

Downloads last month
763
Safetensors
Model size
2B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for madscience75/LFM3-AA1o

Quantized
(52)
this model