/ Модель

Характеристики

Контекст
262 144 токена
Параметры
1,6 млрд
Лицензия
Своя лицензия
Архитектура
lfm3 · dense
Базовая модель
LFM3-1.7B-Heretic-Abliterated
Библиотека
mlx
Опубликована
1 ноя 2026

LFM3-1.7B-Heretic-Abliterated-MLX-bf16

Генерация текстаТекст → текст
529скачиваний за 30 дней0лайковвеса обновлены1 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Русское описание этой модели ещё готовится. Пока можно заглянуть в карточку модели от автора ниже.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

LFM3-1.7B Heretic Abliterated · MLX · bf16

An MLX port of Vortecks/LFM3-1.7B-Heretic-Abliterated for Apple silicon. The weights are the source's bfloat16 bytes, unchanged. There is no quantization, pruning, fine-tuning or new abliteration. The model has its refusal behavior removed, so it applies no safety filtering of its own.

The port matches the reference implementation within the declared tolerances on every check (results). All 286 tensors are bit-identical to the source.

Base modelLiquidAI/LFM3-1.7B
AbliterationVortecks, with Heretic
Parameters~1.73B, bfloat16 (3.46 GB)
ArchitectureLfm3ForCausalLM, 24 layers: 13 gated short convolutions, 5 sliding-window attention, 6 global attention
Context262,144 tokens
Languages16 (see metadata)
Runtimemlx-lm 0.32.2 or later, with trust_remote_code=True
LicenseLFM Open License v1.0 (LICENSE)

How to use

mlx-lm has no built-in LFM3 architecture. This repo ships one as lfm3.py, and config.json points to it. mlx-lm runs that file only when you pass trust_remote_code. Read lfm3.py before you run it.

pip install -U mlx-lm
mlx_lm.generate --model mchen04/LFM3-1.7B-Heretic-Abliterated-MLX-bf16 --trust-remote-code \
  --temp 0.1 --top-k 50 --prompt "Who are you?"
from mlx_lm import load, generate

model, tokenizer = load("mchen04/LFM3-1.7B-Heretic-Abliterated-MLX-bf16", trust_remote_code=True)
messages = [{"role": "user", "content": "Who are you?"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512, verbose=True))

Peak memory is 3.6 GB with short prompts and 4.5 GB with a 16K-token prompt (speed).

Recommended sampling, from the source model card:

ModeSettings
General (chat, tool use, agents, coding)temperature=0.1, top_k=50, repetition_penalty=1.1
Math and STEMtemperature=1.0, top_p=0.95, top_k=20

mlx-lm applies repetition_penalty to the last 20 tokens by default. Transformers applies it to the whole context. Set repetition_context_size in make_logits_processors if you need to match transformers.

The chat template supports tool calls and a thinking block, as in the source model. Pass tools=[...] to apply_chat_template for tool use.

Uses

Intended: local chat, tool calling, structured output and long-context work on Apple silicon, for research and applications that provide their own moderation.

Out of scope: any use without your own safety layer where outputs reach other people. Uses that the LFM Open License or applicable law forbid.

Risks and limitations

  • No refusals. Vortecks reports 3/100 refusals on Heretic's adversarial prompt set, against 92/100 for the base model. The model will produce harmful, false or offensive content on request. The deployer is responsible for moderation and policy compliance.
  • Abliteration changes the model. Vortecks reports a KL divergence of 0.0094 from the base model. That is small, but abliteration can still lower some abilities. This port did not test refusal rates or benchmark scores. It tests only that the port behaves the same as the source model.
  • Strict JSON can fail. On the two JSON prompts in the test set, the source model fails strict parsing in every run: once with unquoted keys and once with text after the array. This port reproduces that exactly. Validate structured output.
  • bfloat16 ties. Greedy decoding at bfloat16 sometimes meets exact logit ties. Equally valid implementations can then choose different tokens, so outputs can differ from transformers after a tie.
  • Custom code. Loading runs lfm3.py from this repo.

Speed

Measured on a Mac mini (Apple M4, 24 GB, macOS 26.2) with mlx 0.32.4 and mlx-lm 0.32.2, using this repo as downloaded from the Hub. mlx_lm.benchmark, batch size 1, 128 generated tokens, one warm-up run, then the mean of 5 trials. The trials varied by less than 1%.

Prompt tokensPrompt processing (tok/s)Generation (tok/s)Peak memory (GB)
12857329.13.65
51293229.03.96
4,0961,06228.64.46
16,38498427.54.55

A real chat request through mlx_lm.generate (21-token prompt, 248 tokens generated) ran at 29.1 tok/s with a peak of 3.5 GB. Generation speed stays nearly flat as the prompt grows, because 13 of the 24 layers are convolutions and 5 more use a 256-token sliding window. This is the unquantized bfloat16 model; a quantized build would be faster.

Startup, same machine, 21-token chat prompt:

CasePython importWeight loadTime to first tokenGeneration (tok/s)
Cold: new process, weights not in the file cache2.5 s1.5 s0.29 s29.0
New process, weights in the file cache0.5 s0.5 s0.14 s28.9
Warm: later requests in a running process——0.11 s29.0

A cold start takes about 4.3 s to the first token. A warm process answers in about 0.1 s.

mlx_lm.benchmark --model mchen04/LFM3-1.7B-Heretic-Abliterated-MLX-bf16 --trust-remote-code -p 512 -g 128 -n 5

Evaluation

The checks compare this port with the source repo's own transformers code, pinned by revision. Each runs at float32 and at bfloat16, on the same token ids, over 9 prompts: chat, translation, multi-turn memory, JSON, tool call, tool follow-up and long-context retrieval. The pass criteria were committed before any real-model run (evidence/TOLERANCES.md).

CheckResult
T1 tensors vs source safetensorsPASS: 286/286 bit-identical
T2 source safetensors vs Vortecks' BF16 GGUFPASS: 286/286 bit-identical
T3 float32 logits, port vs reference (2,076 positions)PASS: max |Δ| 1.44e-3 (limit 5e-3), mean KL 2.3e-10, top-1 100%
T4 float32 greedy continuationsPASS: 9/9 identical
T5 bfloat16 logits vs float32 referencePASS: mean KL 3.73e-3 for the port, 5.39e-3 for the reference's own bfloat16 run
T6 bfloat16 greedy, port vs referencePASS: 6/9 identical; the 3 differences follow near-ties (margins 0.125–0.25, limit 0.5)
T7 chat template rendering and output formatPASS: identical on all 9 conversations; tool call correct in every run
T8 KV-cache decode vs full forwardPASS: max |Δ| 4.33e-3 (limit 5e-3)

Full numbers and greedy outputs: evidence/REPORT.md and evidence/report.json. Hardware: Apple M2, 16 GB, mlx 0.32 and mlx-lm 0.32.2. The parity runs streamed weights layer by layer under a memory cap, so they say nothing about speed.

What changed from the source

The LFM Open License asks for notice of modified files. Only these differ from Vortecks/LFM3-1.7B-Heretic-Abliterated at revision dc37c60c02a35603456c85c2aecd7bc22b23b89c:

  • model.safetensors: the 13 depthwise convolution kernels are stored as (C, K, 1) instead of (C, 1, K), which is the MLX layout. The values are the same bytes. Every other tensor is unchanged.
  • config.json: auto_map removed, "model_file": "lfm3.py" added.
  • lfm3.py: new, an MLX implementation of the LFM3 architecture.
  • convert_manifest.json: new, the sha256 of every input and output file and each change applied.
  • evidence/: new, the verification results.

The tokenizer, chat template and generation config are byte-for-byte copies of the source.

License

This model is a derivative of LiquidAI/LFM3-1.7B and is distributed under the LFM Open License v1.0. The full text is in LICENSE. The license does not cover commercial use by an entity with annual revenue of USD 10 million or more. Read the license for the exact terms.

Credits

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Класс архитектуры
Lfm3ForCausalLM
Ревизия весов
88636d4

0 моделей