/ Модель

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

Лицензия
Своя лицензия
Архитектура
lfm3_omni · dense
Базовая модель
LFM3-Omni-2B
Библиотека
transformers
Опубликована
7 ноя 2026

LFM3-Omni-2B-heretic

Изображение и текст → текст6 профессий
122скачиваний за 30 дней0лайковвеса обновлены7 ноя 2026

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

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

Мультимодальная версия LiquidAI LFM3-Omni-2B с ослабленным поведением отказа для генерации текста, понимания речи и синтеза голоса.

LFM3-Omni-2B-heretic — мультимодальная модель на 2,17 млрд параметров, созданная автором репозитория на основе LiquidAI/LFM3-Omni-2B с помощью адаптированной версии Heretic 1.2.0. В модели ослаблено поведение отказа в языковой части, при этом компоненты обработки изображений и аудио, синтеза речи и клонирования голоса сохранены от базовой модели. Модель предназначена для диалоговой генерации текста, понимания речи, распознавания речи, синтеза речи и продолжения голоса по образцу; в метаданных также заявлена поддержка задач с изображениями. Архитектура — LFM3-Omni, веса в формате BF16 и safetensors; для запуска используется Transformers с trust_remote_code=True.

Карточка заявляет сохранение мультимодальных возможностей базовой модели, включая аудио с частотой 24 кГц, и приводит низкое расхождение KL с исходной моделью. Это утверждения автора карточки, а не независимая оценка. Ослабление отказов означает, что модель может выдавать ответы на запросы, от которых базовая модель отказалась бы. Лицензия указана как other; конкретные условия использования следует сверить с репозиторием и лицензией базовой модели.

Сценарии применения

  • диалоговая генерация текста
  • распознавание речи из аудиозаписей
  • синтез речи по тексту
  • продолжение речи с клонированием голоса по образцу
  • ответы на вопросы по изображениям

Ограничения

Ослабление поведения отказа может приводить к ответам на вредоносные запросы. Указанные в README сохранность возможностей и качество не подтверждены независимой оценкой; лицензия обозначена как other.

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

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

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

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

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

Для каких профессий подходит6

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

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

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

Открыть на Hugging Face

LFM3-Omni-2B-heretic

LFM3-Omni-2B-heretic is an uncensored, refusal-ablated checkpoint of LiquidAI/LFM3-Omni-2B, produced using an adapted build of heretic v1.2.0 supporting hybrid convolution and attention architectures.

The ablation selectively removes refusal behavior from the underlying language backbone while preserving 100% of the vision, audio processing, audio synthesis, and voice-cloning capabilities of the original model.

Metric / PropertySpecification
Base ModelLiquidAI/LFM3-Omni-2B
Total Parameters2.17B (BF16)
Ablation FrameworkHeretic 1.2.0 (hybrid LFM3 layer patch)
Ablation TrialTrial 169 (200 trials Optuna search, --row-normalization full)
Refusal Rate3 / 100 on evaluation suite
KL Divergence0.0231 (extreme fidelity to base model distribution)
Altered Tensors35 / 665 (Language Model residual writers only)
Untouched Tensors630 / 665 (Vision, Audio, Codec, Depth Decoder, Embeddings byte-identical)

Key Highlights

  • Surgical Language Ablation: Only matrices writing to the language model residual stream (o_proj, out_proj, and w2 in model.language_model.layers.*) were modified.
  • Strict Multimodal Preservation: The vision encoder, causal audio encoder, multi-modal projectors, depth former, and the 24 kHz Liquid Audio Codec (audio_tokenizer/) are byte-for-byte identical to Liquid AI's official release (sha256 matching).
  • Audio & Voice Cloning Verified: Audio understanding, ASR (speech-to-text), 24 kHz TTS (text-to-speech), and zero-shot voice continuation cloning work identically to the upstream base model.
  • Ultra-low KL Divergence: At KL = 0.0231, the model preserves standard reasoning, linguistic nuance, and conversational fluency without degradation.

Requirements & Installation

This model requires custom code execution (trust_remote_code=True) and modern transformers:

pip install torch transformers soundfile accelerate

Usage Examples

1. Text Chat / Generation

import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer

model_id = "LiquidAI/LFM3-Omni-2B"  # or your local / HF path

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
).eval()

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Write a creative story about an autonomous AI probe."}
]

prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=512,
        do_sample=False,
    )

response = tokenizer.decode(
    outputs.sequences[0, inputs["input_ids"].shape[1]:],
    skip_special_tokens=True,
)
print(response)

2. Speech Synthesis (TTS - 24 kHz)

import torch
import soundfile as sf
from transformers import AutoModelForMultimodalLM, AutoProcessor

model_id = "LiquidAI/LFM3-Omni-2B"  # or your local / HF path
device = "cuda" if torch.cuda.is_available() else "cpu"

model = AutoModelForMultimodalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map=device,
    trust_remote_code=True,
).eval()

processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
codec = processor.audio_tokenizer.to(device=device).eval()

conversation = [
    {"role": "system", "content": "Perform TTS in American English using a female voice."},
    {"role": "user", "content": "Hello! The uncensored LFM3 Omni model is running smoothly."},
]

inputs = processor.apply_chat_template(
    conversation,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=256,
        generation_mode="audio",
        audio_temperature=0.4,
        audio_repetition_penalty=1.2,
    )
    waveform = codec.decode(
        outputs.audio_codes[:1, :, :outputs.audio_lengths[0]]
    ).audio_values[0]

sf.write("output_tts.wav", waveform.squeeze(0).float().cpu().numpy(), 24000)
print("Saved output_tts.wav at 24 kHz")

3. Speech Recognition (ASR)

import torch
from transformers import AutoModelForMultimodalLM, AutoProcessor

model_id = "LiquidAI/LFM3-Omni-2B"  # or your local / HF path
device = "cuda" if torch.cuda.is_available() else "cpu"

model = AutoModelForMultimodalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map=device,
    trust_remote_code=True,
).eval()
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)

conversation = [
    {"role": "system", "content": "Perform ASR in English."},
    {"role": "user", "content": [{"type": "audio", "audio": "input.wav"}]},
]

inputs = processor.apply_chat_template(
    conversation,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(device)

with torch.no_grad():
    outputs = model.generate(**inputs, max_new_tokens=512, generation_mode="text")

transcription = processor.decode(
    outputs.sequences[0, inputs["input_ids"].shape[1]:outputs.sequence_lengths[0]],
    skip_special_tokens=True,
)
print("Transcription:", transcription)

Technical Ablation Details

The model was ablated using orthogonal projection on the residual stream vectors:

  • Optimization Objective: Minimize refusal rate against harmful prompt distributions while penalizing Kullback-Leibler (KL) divergence against the base model on harmless alpaca queries.
  • Direction Geometry: Delta rank-1 dominant eigenvalues (top-1 ratio 0.993–0.998), relative $L_2$ norm shift 0.019–0.038.
  • Layer Breakdown:
    • o_proj: 9 layers modified
    • out_proj (convolution layers): 10 layers modified
    • w2 (feed-forward down-projection): 16 layers modified
    • Total: 35 modified tensors strictly within model.language_model.

License & Attribution

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
Lfm3OmniForConditionalGeneration
Ревизия весов
ecd80da

0 моделей