Instructions to use netis-ai/smlr-metrics-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use netis-ai/smlr-metrics-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="netis-ai/smlr-metrics-1b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("netis-ai/smlr-metrics-1b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("netis-ai/smlr-metrics-1b", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use netis-ai/smlr-metrics-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "netis-ai/smlr-metrics-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netis-ai/smlr-metrics-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/netis-ai/smlr-metrics-1b
- SGLang
How to use netis-ai/smlr-metrics-1b 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 "netis-ai/smlr-metrics-1b" \ --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": "netis-ai/smlr-metrics-1b", "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 "netis-ai/smlr-metrics-1b" \ --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": "netis-ai/smlr-metrics-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use netis-ai/smlr-metrics-1b with Docker Model Runner:
docker model run hf.co/netis-ai/smlr-metrics-1b
Netis SMLR Tech Preview — smlr-metrics-1b
Netis SMLR Tech Preview. This is a research preview of the Streaming Multi-Lane Reasoner (SMLR). It is provided for evaluation and research; it is not a production monitoring system. Behavior, APIs, and weights may change. Keep a human in the loop for any real operational action.
SMLR is a small language model that watches instead of answering. Instead of "complete input → one answer," it runs as a continuous cognitive process over a live event stream (metrics / logs), deciding at every frame whether to stay silent or escalate — and it is trained to discriminate before it alerts: notice an anomaly, form a hypothesis, query a diagnostic tool, read the decisive field, and only then cry wolf.
This checkpoint is the 1B metrics tier (MiniCPM-derived Llama backbone). Full write-up, architecture, training recipe, evaluation, and a live demo app: https://github.com/Netis/smlr
Architecture
A fused multi-head VLA: one shared backbone + one policy head + six per-lane decode heads.
- policy head —
Linear(hidden, 10); reads the prompt-end hidden state and predictsnext_action(WAIT · NOTE · SUMMARY · QUESTION · VERIFY · QUERY_TOOL · WARN · ALERT · RESOLVE · REVISE) before any lane is decoded. - 6 lane heads —
observation · reasoning · public_output · notes · state_patch · actions, each decoded in parallel through its own head sharing one prefill. - closed loop —
state_patchmerges into the working state and re-enters the next frame;actionsdrives a tool loop.
There is no single lm_head — the lane heads replace it. The model is loaded with trust_remote_code
(custom class SmlrMultiLaneForCausalLM in modeling_smlr.py).
Usage
import torch, json
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "netis-ai/smlr-metrics-1b"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, trust_remote_code=True, dtype=torch.bfloat16
).eval()
model.to("cuda" if torch.cuda.is_available() else "cpu")
SYSTEM = tok.init_kwargs.get("smlr_system") or open("SYSTEM_PROMPT.md").read() # or paste the system prompt
frame = {
"recent_window": [], "working_state": {"link_state": {}}, "retrieved_memory": [],
"new_event": {"seq": 42, "t": 42.0, "type": "metrics_frame",
"links": {"link0": {"latency_ms": 320, "loss_pct": 7.5, "jitter_ms": 45, "throughput_mbps": 120},
"link1": {"latency_ms": 8, "loss_pct": 0.0, "jitter_ms": 1, "throughput_mbps": 940}}},
}
prompt = (f"<|im_start|>system\n{SYSTEM}<|im_end|>\n"
f"<|im_start|>user\n{json.dumps(frame)}<|im_end|>\n<|im_start|>assistant\n")
ids = tok(prompt, return_tensors="pt").input_ids.to(model.device)
out = model.decode_frame(ids) # shared prefill + policy + per-lane decode
print("next_action:", out["next_action"]) # e.g. WAIT (first frame; needs sustain to escalate)
for lane, toks in out["lanes"].items():
if toks:
print(lane, "→", tok.decode(toks, skip_special_tokens=True)[:200])
decode_frame runs one monitoring frame end to end (a shared prefill, the policy read at prefill latency,
then greedy per-lane decode). For real-time monitoring you carry state_patch back into the next frame's
working_state — see the demo app.
The exact system prompt used in training/eval ships with the demo app in the GitHub repo.
Intended use & scope
- In scope: research on streaming/closed-loop monitoring agents; anomaly detection & alerting on metrics streams in the discriminate-then-alert regime.
- Out of scope: a certified production incident system; safety-critical automated remediation without a human; root-cause attribution as sole source of truth.
- Domain. Trained on a specific synthetic monitoring domain (network-link metrics; specific host-log incident types). On arbitrary real host telemetry (raw CPU/memory, general syslog) it is out-of-distribution — the demo maps real host signals into the trained schema, and correctly stays quiet on a healthy machine, reacting to genuine sustained load. Treat detections as a preview.
Evaluation (held-out, deliberately zero-shot)
| Metric | value |
|---|---|
| Metrics detect / alert / false-alerts | 1.0 / 1.0 / 0 |
| Metrics root-cause | 0.75 |
| Logs detect / alert / false-alerts (this 1B tier) | 0.75 / 0.75 / 0 |
Sample sizes are small (n=16 metrics, n=12 logs) — read directional signals only. Full methodology and the research history (including negative results) are in the technical report.
Known limitations
- Root cause is weak on the harder cascade metric (~0.44) and is outside the real-time bar.
dns_failureis a stable blind spot;thermal_throttleshows run-to-run flips.- This is the metrics tier; the logs tier is a separate 4B model (not in this release).
License
MIT for the SMLR code and this modeling file. The base model is MiniCPM-derived and remains under its upstream license; downstream users are responsible for upstream license compliance.
- Downloads last month
- 152