Views
No views yet
"vibrate for 2 seconds"
→ [{"name":"termux_vibrate","arguments":{"duration_ms":2000}}]| metric | base needle | this model |
|---|---|---|
| call_f1 (name+args exact) | 75.0% | 99.7% |
| name_f1 | 94.6% | 100.0% |
| exact_match | 72.7% | 99.7% |
| args_acc | 79.2% | 99.7% |
| parse_rate | 99.3% | 100.0% |
| file | format | use with |
|---|---|---|
needle_sting_final.pkl | needle checkpoint (JAX/Flax, f16) | the official needle pipeline: needle run --checkpoint needle_sting_final.pkl --query "..." --tools '[...]' |
model.safetensors + config.json + tokenizer_spec.json | f16 safetensors + JSON specs | sting's pure-Rust candle runtime |
1from needle import SimpleAttentionNetwork, load_checkpoint, generate, get_tokenizer
2
3params, config = load_checkpoint("needle_sting_final.pkl")
4model = SimpleAttentionNetwork(config)
5result = generate(
6 model, params, get_tokenizer(),
7 query="read the gyroscope, 5 readings",
8 tools='[{"name":"termux_sensor","description":"Read values from a hardware sensor on the device.","parameters":{"sensor":{"type":"string","description":"Sensor name: accelerometer, gyroscope, light, proximity, pressure, magnetic_field or gravity.","required":true},"limit":{"type":"integer","description":"Number of readings to take.","required":false}}}]',
9 stream=False,
10)
11# [{"name":"termux_sensor","arguments":{"sensor":"gyroscope","limit":5}}]1pkg install rust git binutils termux-api
2git clone https://github.com/abod707/sting
3cd sting && ./scripts/termux-install.sh
4sting "turn on the flashlight"[]. Custom tools work zero-shot via the generic schemas it
saw in training; for production use of your own tools, finetune with ~120
examples per tool (recipe in the sting repo).