Views
No views yet
"bio + D1 soccer under 40k" and produces:{"reasoning": "bio + D1 soccer + tuition", "majors": ["Biology"], "sport": "Soccer", "division": "NCAA Division I", "tuition_max": 40000}| Metric | Base LFM2.5-350M | With this adapter |
|---|---|---|
| Precision | 0.0% | 92.8% |
| Recall | 0.0% | 92.8% |
| Value Accuracy | 0.0% | 93.9% |
| Parse Errors | 30/30 | 0/30 |
1from mlx_lm import load, generate
2
3model, tokenizer = load(
4 "LiquidAI/LFM2.5-350M-MLX-4bit",
5 adapter_path="franckverrot/stktc-lfm-adapters"
6)
7
8prompt = """You convert a university search query into a JSON filter.
9Output ONLY the JSON object, nothing else.
10
11User: "nursing in texas" /no_think"""
12
13output = generate(model, tokenizer, prompt=prompt, max_tokens=200)
14# {"reasoning":"nursing + TX","majors":["Nursing"],"state":["TX"]}1// Load base model
2let container = try await LLMModelFactory.shared.loadContainer(
3 configuration: ModelConfiguration(id: "LiquidAI/LFM2.5-350M-MLX-4bit")
4)
5
6// Download and apply adapter
7let hub = HubApi()
8let adapterDir = try await hub.snapshot(
9 from: Hub.Repo(id: "franckverrot/stktc-lfm-adapters"),
10 matching: ["*.safetensors", "*.json"]
11)
12let adapter = try LoRAContainer.from(directory: adapterDir)
13try await container.perform { context in
14 try context.model.load(adapter: adapter)
15}self_attn.q_proj, self_attn.v_proj (12 layers)