CoolFace
Modelpublic

OpenMed/LFM2-1.2B-Longevity-4bit-mlx

sourceHugging Faceotherupdated 4d agoView on Hugging Face
0likes26downloads
Model Card

LFM2-1.2B-Longevity - MLX 4-bit

A native MLX conversion of `LiquidAI/LFM2-1.2B-Longevity`, affine-quantized to 4-bit (group size 64) with mlx_lm for on-device use on Apple Silicon. The model is Liquid AI and Insilico Medicine's Longevity-LLM fine-tune of `LiquidAI/LFM2-1.2B`; OpenMed made and published this conversion. For the 8-bit sibling, see `OpenMed/LFM2-1.2B-Longevity-8bit-mlx`.

Family at a glance: - PyTorch source (BF16): `LiquidAI/LFM2-1.2B-Longevity` - 2.18 GiB weights - MLX 4-bit (this repo): `OpenMed/LFM2-1.2B-Longevity-4bit-mlx` - Apple Silicon, 0.61 GiB weights - MLX 8-bit: `OpenMed/LFM2-1.2B-Longevity-8bit-mlx` - Apple Silicon, 1.16 GiB weights

Why 4-bit?

BF16 sourceThis repo (Q4)
model.safetensors size2.18 GiB0.61 GiB (3.6x smaller)
Bits per weight, measured from the tensors164.50
Parameters1.17 B1.17 B (unchanged)

4-bit is the rung to reach for when memory is the constraint - a phone or a base-model Mac - and the weights above are the whole download.

Quantization

FieldValue
Bits4
Group size64
Modeaffine MLX weight-only quantization
Toolmlx_lm.convert (mlx-lm 0.31.3), -q --q-bits 4 --q-group-size 64
Quantized modulesevery linear projection and the tied token embedding
Kept in BF16RMSNorm scales and the short-convolution kernels

The tokenizer, chat template and generation defaults are the upstream files, unchanged.

What it does

Longevity-LLM (L-LLM) is a family of compact, domain-adapted language models for interpreting heterogeneous aging-biology data - genomic, proteomic and clinical - developed jointly by Insilico Medicine and Liquid AI. This checkpoint was produced by full-parameter supervised fine-tuning of LiquidAI/LFM2-1.2B on aging-related multi-omics and clinical data, and accompanies the study An Open Benchmark and Language Models for AI in Aging Biology (Zhavoronkov et al., 2026). See the upstream model card for the training corpus and evaluation.

Prompts use a ChatML-style template with a dynamic-thinking switch: suffix a user turn with /think for a reasoning trace or /no_think for a direct answer. The template is bundled, so apply_chat_template and mlx_lm handle it for you.

Architecture

FieldValue
Source model typelfm2 (Lfm2ForCausalLM)
DesignHybrid Liquid model: gated short convolutions with 6 grouped-query attention layers out of 16
Hidden size2048
Layers16 (6 attention, 10 convolution)
Attention32 query heads / 8 KV heads
Feed-forward width12,288
Context length32,768 tokens per the upstream card (max_position_embeddings 128,000)
Vocabulary65,536, tied input/output embeddings
LanguageEnglish

File set

FileSizePurpose
model.safetensors0.61 GiBMLX weights, affine-quantized
model.safetensors.index.json22.9 KiBTensor index
config.json1.7 KiBModel config with the quantization block
modeling_lfm2.py35.7 KiBReference PyTorch modeling file carried from upstream; not used by MLX
chat_template.jinja2.5 KiBChatML-style chat template, unchanged from upstream
tokenizer.json4.5 MiBTokenizer, unchanged from upstream
tokenizer_config.json0.5 KiBTokenizer metadata, unchanged from upstream
generation_config.json0.2 KiBDefault sampling settings, unchanged from upstream
LICENSE10.3 KiBLFM Open License v1.0 (upstream copy)

Weights SHA-256: d4968839d8c62d8fad070aaadfb6d41eb8b7ed32d0e69e8c5096a12e64b185e2

Quick start

With mlx-lm

bash
pip install -U mlx-lm
mlx_lm.generate --model OpenMed/LFM2-1.2B-Longevity-4bit-mlx \
  --prompt "Which biomarkers in a routine blood panel are most informative about biological age, and why? /no_think" \
  --max-tokens 400
python
from mlx_lm import load, generate

model, tokenizer = load("OpenMed/LFM2-1.2B-Longevity-4bit-mlx")

messages = [
    {"role": "system", "content": "You are a biomedical AI specialized in aging biology, trained on genomic, proteomic, and clinical data."},
    {"role": "user", "content": "A 58-year-old has HbA1c 6.1%, hs-CRP 3.4 mg/L and an epigenetic age 6 years above chronological age. What do these point to, and what would you want measured next? /no_think"},
]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=500))

With LM Studio

Download the repository into your LM Studio models directory (or search for OpenMed/LFM2-1.2B-Longevity-4bit-mlx in the app); the MLX engine loads it directly.

Outputs are model predictions for research use, not clinical advice.

Provenance and license

This repository is a quantized derivative of LiquidAI/LFM2-1.2B-Longevity. model.safetensors was produced by mlx_lm.convert from the upstream BF16 weights and config.json carries the added quantization block; every other file is an unchanged upstream copy. It is distributed under the upstream LFM Open License v1.0: free for research and for commercial use by entities below the license's revenue threshold (US$10M annual revenue), and not licensed for commercial use above it - read the LICENSE before shipping. Copyright in the model remains with Liquid AI, Inc. and Insilico Medicine; OpenMed claims none.

Citation

Please cite the upstream work:

bibtex
@article{zhavoronkov2026longevitybench,
  title   = {An Open Benchmark and Language Models for AI in Aging Biology},
  author  = {Zhavoronkov, Alex and Naumov, Vladimir and Sidorenko, Denis and Aliper, Alex and Aladinskiy, Vladimir and Hasani, Ramin and Amini, Alexander and Nasto, Katerina and Reymond, Mathieu and Shayakhmetov, Rim and Miftakhutdinov, Zulfat and Gladyshev, Vadim N. and Galkin, Fedor},
  journal = {Cell},
  volume  = {189},
  pages   = {5980--5994},
  year    = {2026},
  doi     = {10.1016/j.cell.2026.08.026},
  url     = {https://www.cell.com/cell/fulltext/S0092-8674(26)00999-2},
}