Instructions to use zack-r-s/hackring-LFM2.5-230M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zack-r-s/hackring-LFM2.5-230M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zack-r-s/hackring-LFM2.5-230M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zack-r-s/hackring-LFM2.5-230M") model = AutoModelForCausalLM.from_pretrained("zack-r-s/hackring-LFM2.5-230M", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zack-r-s/hackring-LFM2.5-230M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zack-r-s/hackring-LFM2.5-230M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zack-r-s/hackring-LFM2.5-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zack-r-s/hackring-LFM2.5-230M
- SGLang
How to use zack-r-s/hackring-LFM2.5-230M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zack-r-s/hackring-LFM2.5-230M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zack-r-s/hackring-LFM2.5-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zack-r-s/hackring-LFM2.5-230M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zack-r-s/hackring-LFM2.5-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zack-r-s/hackring-LFM2.5-230M with Docker Model Runner:
docker model run hf.co/zack-r-s/hackring-LFM2.5-230M
Hackring LFM2.5-230M: dataset/model v004
This merged full-weight checkpoint was fine-tuned from LiquidAI/LFM2.5-230M on the matching dataset v004. It does not continue the v002 or v003 checkpoints. The original LFM Open License v1.0 is included in LICENSE; use and redistribution remain subject to its terms. The shared repository's v002, v003, and v004 tags preserve their respective checkpoints; main serves v004.
What changed
The earlier checkpoints were trained to emit numerical channel_write PV setpoints. V004 is trained to convert an operator orbit-centering request into orbit_correct(plane, effort), where plane is X, Y, or both and effort is gentle, balanced, or aggressive. A separate deterministic bounded least-squares skill reads the fixed 24-PV simulated PyAT ring, computes corrector settings from the versioned response matrix, writes them, and measures the after-state. The model does not calculate kick values. The operator harness normalizes an unspecified effort to balanced and rejects a wrong explicit effort or wrong plane before writing. No Osprey or lattice configuration was changed for this pass.
The 432/72/72 train/validation/test conversations come from fresh seed-disjoint local PyAT disturbances; no GPT annotation was used. The Liquid Finetune run used assistant-only SFT, default rank-8 LoRA, two epochs and 108 optimizer steps on Apple M4 Pro MPS. Validation loss was 0.0381 then 0.0315. training_job.yaml, dataset_manifest.json, and training_results.json record the configuration and hashes. The source and version chart are in integration PR #8; the checkpoint's training commit remains on zrs-lfm-training.
Measured evaluation
Historical, pre-reconciliation results. The table below was produced before PR #8 combines the reporting, training, Gym, and chat lanes. Revalidate each data version and rerun tests/evaluations from the base checkpoint through matching model/data versions v002, v003, and v004 under the reconciled code. Call every new local PyAT and NeMo Gym output Mark II (mark-ii in paths and metadata), preserve the original reports under evals/mark-i/ and var/gym/mark-i/, and record exact model/data tags and hashes, evaluator/solver revision, split, interface, and objective. Gym's current channel_write task does not evaluate this checkpoint's orbit_correct behavior; a matching Gym task and new Mark II run are needed. Its episode-order split overlaps the v001 train-labelled measurements used for response-matrix calibration. Gym's penalized both-plane cost and this table's requested-plane RMS are distinct outcomes, so they should not be combined into one score.
The local PyAT evaluator uses 28 correction requests frozen before v004 training, with unseen seeds and wording. It does not force a tool-call prefix. The solver and plant are identical for base and v004.
| Measurement | Base 230M | v004 |
|---|---|---|
| Correct plane and effort, followed by measured RMS improvement | 0/28 | 12/28 |
| Correct plane selection | 14/28 | 28/28 |
| Measured improvement after the live balanced-default rule is applied to saved calls | 14/28 | 28/28 |
The 28/28 result is for model routing plus deterministic effort normalization and numerical control; 16 v004 calls needed the balanced-default normalization. The model's raw effort choice remains unreliable on unfamiliar no-preference wording. On the separate seed-distinct v004 test split, exact plane-and-effort selection passed 67/72 and plane selection passed 72/72. The five failures were effort misclassifications. An explicit aggressive request with the wrong effort is rejected by the live guard without a write. pyat_eval_report.json, pyat_eval_comparison.json, pyat_eval_default_replay.json, and pyat_test_report.json provide the measured summaries; full Mark I traces are in GitHub under evals/mark-i/pyat-v004/. New local PyAT reports belong under evals/mark-ii/; new Gym runs belong under var/gym/mark-ii/.
These are simulated-plant results. This pass does not establish model-only inverse-optics ability, performance on BPM-report or exact-write requests, a live Osprey/EPICS end-to-end score, or generalization to a real accelerator.
Serve
vllm serve zack-r-s/hackring-LFM2.5-230M --revision v004 \
--served-model-name LFM2.5-230M --enable-auto-tool-choice \
--tool-call-parser lfm2 --host 127.0.0.1 --port 8000
The lfm2 tool parser is required. The checked-in Hackring chat agent supplies the skill implementation and checks the operator intent; serving this checkpoint alone does not provide accelerator control.
- Downloads last month
- -