Safetensors
GGUF
English
Russian
lfm3
reasoning
test-time-compute
inference-time-scaling
code-generation
llama.cpp
negative-results
conversational
Instructions to use HelioAI/LFM3-1.7B-inference-modules-experiments with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M # Run inference directly in the terminal: llama cli -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M # Run inference directly in the terminal: llama cli -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Use Docker
docker model run hf.co/HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Ollama:
ollama run hf.co/HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
- Unsloth Desktop
- Pi
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Docker Model Runner:
docker model run hf.co/HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
- Lemonade
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Run and chat with the model
lemonade run user.LFM3-1.7B-inference-modules-experiments-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download research/scripts/build_vis_page.py from HelioAI/LFM3-1.7B-inference-modules-experiments: direct link, hf CLI and curl.
- Browser
- Download file 5.15 kB
-
https://huggingface.co/HelioAI/LFM3-1.7B-inference-modules-experiments/resolve/main/research/scripts/build_vis_page.py
- Command line
-
hf download hf://HelioAI/LFM3-1.7B-inference-modules-experiments/research/scripts/build_vis_page.py
-
curl -L -o build_vis_page.py https://huggingface.co/HelioAI/LFM3-1.7B-inference-modules-experiments/resolve/main/research/scripts/build_vis_page.py
5.15 kB
| """Collects the visual benchmark into a data bundle for the comparison page: for every task the screenshots, objective | |
| checks and source code of each condition (model runs and my references). | |
| usage: build_vis_page.py --out artifact_vis --src "Исходная модель=vis_base" "Система=vis_rep" --ref vis_claude \ | |
| --template artifact_vis/template.html --lede "..." --note "..." | |
| Writes <out>/img/<key>_<task>_<sample>.webp, <out>/data.json and, with --template, <out>/index.html (data inline). | |
| """ | |
| import argparse | |
| import json | |
| import os | |
| import sys | |
| from PIL import Image | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| from render import extract # noqa: E402 | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--out", required=True) | |
| ap.add_argument("--src", nargs="+", required=True, help="label=tag of model runs (results/<tag>/vis.jsonl, visual.json)") | |
| ap.add_argument("--ref", default="vis_claude") | |
| ap.add_argument("--ref-dir", default="data/visual/claude") | |
| ap.add_argument("--tasks", default="data/visual/tasks.jsonl") | |
| ap.add_argument("--w", type=int, default=560) | |
| ap.add_argument("--template", default=None, help="page template with a /*DATA*/ placeholder -> <out>/index.html") | |
| ap.add_argument("--lede", default="") | |
| ap.add_argument("--note", default="") | |
| a = ap.parse_args() | |
| tasks = [json.loads(l) for l in open(a.tasks, encoding="utf-8")] | |
| os.makedirs(os.path.join(a.out, "img"), exist_ok=True) | |
| def webp(png, key): | |
| if not os.path.exists(png): | |
| return None | |
| im = Image.open(png).convert("RGB") | |
| im = im.resize((a.w, a.w * im.height // im.width), Image.LANCZOS) | |
| name = f"img/{key}.webp" | |
| im.save(os.path.join(a.out, name), "WEBP", quality=82, method=6) | |
| return name | |
| def checks(rep, task): | |
| if rep is None: | |
| return {"clean": False, "issues": ["no answer"]} | |
| issues = [] | |
| if rep.get("parse_error") == "no code": | |
| issues.append("no code block") | |
| elif rep.get("parse_error"): | |
| issues.append("invalid SVG") | |
| issues += [e[:120] for e in rep.get("errors", [])[:2] if e != "no code block"] | |
| if rep.get("failed"): | |
| issues.append("resource failed to load") | |
| if rep.get("blank") and rep.get("parse_error") != "no code": | |
| issues.append("blank page") | |
| if task["animated"] and not rep.get("animated"): | |
| issues.append("does not move") | |
| if rep.get("overflow"): | |
| issues.append("wider than the window") | |
| return {"clean": bool(rep.get("clean")), "issues": issues} | |
| conds = [] | |
| for spec in a.src: | |
| label, tag = spec.split("=", 1) | |
| reps = {(r["id"], r["sample"]): r for r in json.load(open(f"results/{tag}/visual.json", encoding="utf-8"))} | |
| recs = {} | |
| for fn in os.listdir(f"results/{tag}"): | |
| if fn.endswith(".jsonl") and "graded" not in fn: | |
| for l in open(f"results/{tag}/{fn}", encoding="utf-8"): | |
| r = json.loads(l) | |
| recs[(r["id"], r.get("sample", 0))] = r | |
| conds.append((label, tag, reps, recs)) | |
| data = {"conditions": [c[0] for c in conds] + ["Claude"], "tasks": []} | |
| for t in tasks: | |
| tid, short = t["id"], t["id"].split("/")[1] | |
| prompt = t["prompt"].split("Answer with")[0].strip() | |
| row = {"id": short, "cat": t["cat"], "kind": t["kind"], "animated": t["animated"], "prompt": prompt, "cells": []} | |
| for label, tag, reps, recs in conds: | |
| samples = [] | |
| for s in (0, 1): | |
| rec = recs.get((tid, s)) | |
| if rec is None: | |
| continue | |
| fin = rec["completion"].split("</think>", 1)[1] if "</think>" in rec["completion"] else None | |
| code = extract(fin, t["kind"]) | |
| rep = reps.get((tid, s)) | |
| samples.append({"img": webp(f"results/{tag}/png/{short}_{s}.png", f"{tag}_{short}_{s}"), "code": code or "", | |
| "tokens": rec.get("n_tokens"), **checks(rep, t)}) | |
| row["cells"].append(samples) | |
| ref = None | |
| for ext in ("svg", "html"): | |
| p = os.path.join(a.ref_dir, f"{short}.{ext}") | |
| if os.path.exists(p): | |
| reps = {r["id"]: r for r in json.load(open(f"results/{a.ref}/visual.json", encoding="utf-8"))} | |
| ref = [{"img": webp(f"results/{a.ref}/png/{short}_0.png", f"ref_{short}_0"), | |
| "code": open(p, encoding="utf-8").read(), "tokens": None, **checks(reps.get(tid), t)}] | |
| row["cells"].append(ref or []) | |
| data["tasks"].append(row) | |
| data["meta"] = {"lede": a.lede, "note": a.note} | |
| json.dump(data, open(os.path.join(a.out, "data.json"), "w", encoding="utf-8"), ensure_ascii=False) | |
| if a.template: | |
| page = open(a.template, encoding="utf-8").read() | |
| blob = json.dumps(data, ensure_ascii=False).replace("</", "<\\/") | |
| open(os.path.join(a.out, "index.html"), "w", encoding="utf-8").write(page.replace("/*DATA*/", blob)) | |
| n_img = len(os.listdir(os.path.join(a.out, "img"))) | |
| size = sum(os.path.getsize(os.path.join(a.out, "img", f)) for f in os.listdir(os.path.join(a.out, "img"))) | |
| print(f"{len(data['tasks'])} tasks, {len(data['conditions'])} conditions, {n_img} images ({size / 1e6:.1f} MB), " | |
| f"data.json {os.path.getsize(os.path.join(a.out, 'data.json')) / 1e3:.0f} kB") | |