Find more details in the original model card:
https://huggingface.co/LiquidAI/LFM2.5-2.6B
Each precision is available both as a standalone repo and as a subfolder of this repo.
1from mlx_lm import load, generate
2from mlx_lm.sample_utils import make_sampler
3
4model, tokenizer = load("LiquidAI/LFM2.5-2.6B-MLX-4bit")
5
6response = generate(
7 model,
8 tokenizer,
9 prompt="The capital of France is",
10 max_tokens=100,
11 sampler=make_sampler(temp=0.7),
12 verbose=True,
13)
1from huggingface_hub import snapshot_download
2from mlx_lm import load, generate
3from mlx_lm.sample_utils import make_sampler
4
5path = snapshot_download("LiquidAI/LFM2.5-2.6B-MLX", allow_patterns=["4bit/*"])
6model, tokenizer = load(f"{path}/4bit")
7
8response = generate(
9 model,
10 tokenizer,
11 prompt="The capital of France is",
12 max_tokens=100,
13 sampler=make_sampler(temp=0.7),
14 verbose=True,
15)