Views
No views yet
Cactus-Compute/needle
specialized for transit tool-calling. It translates a natural-language transit query into
one of two tool calls — or refuses when no tool applies.| Parameters | 26M |
| Base model | Cactus-Compute/needle |
| Architecture | Encoder-decoder Simple Attention Network (d_model=512, enc×12, dec×8, GQA 8H/4KV) |
| Vocab | 8192 (SentencePiece BPE) |
| Format | JAX/Flax checkpoint (.pkl) |
| Languages | French, English, FR/EN code-switching |
| License | MIT |
1[
2 {
3 "name": "search_itinerary",
4 "description": "Plan a route between two points.",
5 "parameters": {
6 "origin": {"type": "string", "description": "Start location.", "required": true},
7 "destination": {"type": "string", "description": "End location.", "required": true},
8 "time_human": {"type": "string", "description": "Human time expression, e.g. 'a 14h'.", "required": false},
9 "time_mode": {"type": "string", "description": "'depart_at' or 'arrive_by'.", "required": false}
10 }
11 },
12 {
13 "name": "get_next_arrivals",
14 "description": "Next departures/arrivals at a stop.",
15 "parameters": {
16 "station": {"type": "string", "description": "Stop or station name.", "required": true},
17 "line": {"type": "string", "description": "Line identifier, e.g. '1', 'RER A'.", "required": false}
18 }
19 }
20]search_itinerary vs get_next_arrivals from intent.depart_at vs arrive_by disambiguation from natural phrasing.| Query | Output |
|---|---|
itinéraire pour Montparnasse | [{"name":"search_itinerary","arguments":{"destination":"Montparnasse"}}] |
de Bastille à Nation vers 17h | [{"name":"search_itinerary","arguments":{"origin":"Bastille","destination":"Nation","time_human":"vers 17h","time_mode":"depart_at"}}] |
Je voudrais arriver à Gare de Lyon pour 9h | [{"name":"search_itinerary","arguments":{"destination":"Gare de Lyon","time_human":"pour 9h","time_mode":"arrive_by"}}] |
je suis à Bastille, direction La Défense | [{"name":"search_itinerary","arguments":{"origin":"Bastille","destination":"La Défense"}}] |
nation bastille 8h | [{"name":"search_itinerary","arguments":{"origin":"nation","destination":"bastille","time_human":"8h","time_mode":"depart_at"}}] |
I need to be at Nation by 9am from Bastille | [{"name":"search_itinerary","arguments":{"origin":"Bastille","destination":"Nation","time_human":"by 9am","time_mode":"arrive_by"}}] |
Prochain RER B à Gare du Nord | [{"name":"get_next_arrivals","arguments":{"station":"Gare du Nord","line":"RER B"}}] |
raconte une blague sur la SNCF | [] |
combien coûte un ticket de métro ? | [] |
nation/bastille above); canonical resolution is the backend's job.needle package (Cactus Compute), then:1from needle import SimpleAttentionNetwork, load_checkpoint, generate, get_tokenizer
2
3params, config = load_checkpoint("needle-transit.pkl")
4model = SimpleAttentionNetwork(config)
5tokenizer = get_tokenizer()
6
7result = generate(
8 model, params, tokenizer,
9 query="Prochain RER B à Gare du Nord",
10 tools='[{"name":"get_next_arrivals","description":"Next departures at a stop.","parameters":{"station":{"type":"string","description":"Stop name.","required":true},"line":{"type":"string","description":"Line id.","required":false}}}]',
11 stream=False,
12)
13print(result)
14# [{"name":"get_next_arrivals","arguments":{"station":"Gare du Nord","line":"RER B"}}]--w-name/--w-value/--w-key), and metrics logging:needle finetune data.jsonl --lr 3e-5 --w-value 4.0@misc{ndubuaku2026needle,
title={Needle},
author={Henry Ndubuaku and Jakub Mroz and Karen Mosoyan and Roman Shemet and Parkirat Sandhu and Satyajit Kumar and Noah Cylich and Justin H. Lee},
year={2026},
url={https://github.com/cactus-compute/needle}
}