SAM is a compact (33.4M params, ~127.4 MB FP32)
schema-conditioned model that turns natural language into structured JSON actions
across 10 domains: robotics, HTTP/REST, MQTT/IoT, databases, workflows,
e-commerce, vehicles, smart home, calendar/email, and filesystem.
Built by AMEFORGE on the in-house SparseMind architecture.
SAM is the successor to Foros.
Where Foros specialized in robotics ROS-JSON, SAM generalizes the approach to
the full agentic / workflow stack while preserving the SparseMind architecture.
TL;DR
The cheap path to reliable JSON for agentic systems:
Today (LLM API)
With SAM
Output reliability
broken JSON → retry loop
atomic-numeric tokenizer + schema-conditioned
Latency
500–3000 ms
~30–200 ms (CPU)
Cost / 1M calls
$$$$
$0 (offline)
Deployment
API key, cloud, privacy concerns
runs on Jetson, Pi, laptop CPU
Benchmark
Evaluated on the SAM Bench v1 — 200 prompts covering all 10 domains across
5 difficulty tiers (atomic / compound / noisy / long-chain / cross-domain).
(Benchmark not yet run. After training, execute python sam_benchmark.py to populate this section.)
Use the sam_runtime.py SDK for a clean inference path with optional
constrained decoding:
python
1from sam_runtime import SAM
23sam = SAM.from_hub("AMFORGE/sam-v1")# downloads weights + tokenizer45result = sam.generate(6 task="get user 42 from api.example.com",7 domain="HTTP",8 schema={"type":"array"},9 mode="guarded",# JSON-validated decoding10)1112print(result["ops"])13# -> [{"op":"http_request","method":"GET","url":"https://api.example.com/users/42"}]
For OpenAI-compatible tool calling, drop-in replacement:
python
1result = sam.tool_call(2 tools=[{...openai-style tool spec...}],3 messages=[{"role":"user","content":"get me user 42"}],4)
Training
SAM was trained on a large, deterministic multi-domain corpus assembled
in-house at AMEFORGE. The corpus covers all 10 supported domains across
5 difficulty tiers (atomic / compound / noisy / long-chain / cross-domain),
with paraphrase variation, robustness augmentation, and schema conditioning.
Training was performed on a single GPU using a custom optimizer setup tailored
to the SparseMind architecture. Full training methodology and the dataset
construction pipeline are kept internal as part of AMEFORGE's IP.
Limitations
English-only. Multilingual extension is future work.
Schema-conditioned: best results when a JSON Schema is provided in the prompt.
Domain set is fixed at 10. New domains require fine-tuning or retraining.
Numeric atomicity is guaranteed within the production-relevant ranges for
each domain. Values outside those ranges fall back to subword encoding.
Not a chat model — single-turn, structured action generation only.
Citation
bibtex
1@misc{sam_2026,
2 title = {SAM: A Compact Schema-Conditioned Structured Action Model
3 for Agentic AI},
4 author = {AMEFORGE},
5 year = {2026},
6 note = {Built on the SparseMind architecture.
7 https://huggingface.co/AMFORGE/sam-v1}
8}