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:8080/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:8080/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:8080/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 runtime/lcb_tests.py from HelioAI/LFM3-1.7B-inference-modules-experiments: direct link, hf CLI and curl.
- Browser
- Download file 3.78 kB
-
https://huggingface.co/HelioAI/LFM3-1.7B-inference-modules-experiments/resolve/main/runtime/lcb_tests.py
- Command line
-
hf download hf://HelioAI/LFM3-1.7B-inference-modules-experiments/runtime/lcb_tests.py
-
curl -L -o lcb_tests.py https://huggingface.co/HelioAI/LFM3-1.7B-inference-modules-experiments/resolve/main/runtime/lcb_tests.py
3.78 kB
| """Test runner for LiveCodeBench items (stdin programs and LeetCode-style functional solutions). | |
| run_lcb(code, item, tests) -> (passed, total, first failure description); stops at the first failing test.""" | |
| import json | |
| import os | |
| import subprocess | |
| import sandbox # noqa: E402 (same folder) | |
| import sys | |
| import tempfile | |
| TMP = os.path.join(tempfile.gettempdir(), "lfm3_lcb") | |
| os.makedirs(TMP, exist_ok=True) | |
| HARNESS = r''' | |
| import sys, json | |
| from typing import * | |
| import collections, heapq, bisect, itertools, functools, math, string, re | |
| from collections import * | |
| from heapq import * | |
| from bisect import * | |
| from itertools import * | |
| from functools import * | |
| from math import * | |
| sys.setrecursionlimit(1 << 20) | |
| __CODE__ | |
| _tests = json.loads(sys.stdin.read()) | |
| for _k, (_inp, _exp) in enumerate(_tests): | |
| _args = [json.loads(_l) for _l in _inp.strip().split("\n")] | |
| try: | |
| _res = getattr(Solution(), __FUNC__)(*_args) | |
| except Exception as _e: | |
| print(json.dumps({"k": _k, "err": repr(_e)[:300]})) | |
| sys.exit(0) | |
| _exp_v = json.loads(_exp) | |
| _ok = _res == _exp_v or (isinstance(_res, tuple) and list(_res) == _exp_v) or ( | |
| isinstance(_res, float) and isinstance(_exp_v, (int, float)) and abs(_res - _exp_v) < 1e-6) | |
| if not _ok: | |
| print(json.dumps({"k": _k, "got": repr(_res)[:300]})) | |
| sys.exit(0) | |
| print(json.dumps({"k": len(_tests)})) | |
| ''' | |
| def _same(got, exp): | |
| a, b = got.split(), exp.split() | |
| if len(a) != len(b): | |
| return False | |
| for x, y in zip(a, b): | |
| if x != y: | |
| try: | |
| if abs(float(x) - float(y)) > 1e-6 * max(1.0, abs(float(y))): | |
| return False | |
| except ValueError: | |
| return False | |
| return True | |
| def _run(src, stdin, timeout): | |
| fd, path = tempfile.mkstemp(suffix=".py", dir=TMP) | |
| with os.fdopen(fd, "w", encoding="utf-8") as f: | |
| f.write(src) | |
| try: | |
| r = sandbox.run([sys.executable, "-I", path], input=stdin.encode(), capture_output=True, timeout=timeout, | |
| cwd=TMP, creationflags=getattr(subprocess, "CREATE_NO_WINDOW", 0)) | |
| return r.returncode, r.stdout.decode(errors="replace"), r.stderr.decode(errors="replace") | |
| except subprocess.TimeoutExpired: | |
| return -1, "", "TimeoutError: time limit exceeded" | |
| finally: | |
| try: | |
| os.remove(path) | |
| except OSError: | |
| pass | |
| def run_lcb(code, item, tests, per_test_timeout=6): | |
| if item["testtype"] == "functional": | |
| src = HARNESS.replace("__CODE__", code).replace("__FUNC__", repr(item["func_name"])) | |
| rc, so, se = _run(src, json.dumps(tests), per_test_timeout * max(1, min(len(tests), 10))) | |
| try: | |
| res = json.loads(so.strip().splitlines()[-1]) | |
| except Exception: | |
| err = "\n".join(se.strip().splitlines()[-5:]) or "TimeoutError: time limit exceeded" | |
| return 0, len(tests), f"Running the solution failed:\n{err}" | |
| k = res["k"] | |
| if k == len(tests): | |
| return k, len(tests), None | |
| inp, exp = tests[k] | |
| got = res.get("got") or ("raised " + res.get("err", "")) | |
| return k, len(tests), f"Input:\n{inp[:800]}\nExpected:\n{exp[:400]}\nYour solution returned:\n{got}" | |
| for k, (inp, exp) in enumerate(tests): | |
| rc, so, se = _run(code, inp, per_test_timeout) | |
| if not (rc == 0 and _same(so, exp)): | |
| got = so.strip()[:400] if rc == 0 else (so.strip()[:200] + "\n" + "\n".join(se.strip().splitlines()[-5:])).strip() | |
| return k, len(tests), f"Input:\n{inp[:800]}\nExpected output:\n{exp[:400]}\nYour program's output:\n{got or '(nothing)'}" | |
| return len(tests), len(tests), None | |