danelcsb commited on
Commit
5d36ce8
·
verified ·
1 Parent(s): 4f3918f

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +39 -0
  2. agent_heads.bin +3 -0
  3. config.json +18 -0
  4. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: pytorch
4
+ tags: [tool-calling, agent, tiny-llm, byte-level, on-device, from-scratch]
5
+ pipeline_tag: text-generation
6
+ ---
7
+
8
+ # ultra-tiny-1m — LocalAgent (0.98M params)
9
+
10
+ A **from-scratch, byte-level** tool-calling agent model from
11
+ [LocalAgent](https://github.com/sangbumchoi/localagent). Pure PyTorch, **0.98M params**,
12
+ trained on CPU. It pairs a tiny decoder (GQA + RoPE + SwiGLU + depth-recurrence) with a **dual head**
13
+ (tool-selection classifier + pointer/copy argument head) and **prompt-grounded constrained
14
+ decoding** for reliable tool calls across 21 tools (general assistant, the Claude Code /
15
+ Codex coding surface, and computer-use / productivity tools), including parallel two-call turns.
16
+
17
+ ## Architecture
18
+ - vocab 256 (byte-level), d_model 192, layers 2 x6 loops, heads 6/2 (GQA), ffn 640
19
+ - factorized embeddings: True
20
+
21
+ ## Files
22
+ - `config.json` — `ModelConfig`
23
+ - `model.safetensors` / `pytorch_model.bin` — decoder weights
24
+ - `agent_heads.bin` — trained tool-selection + pointer heads (optional)
25
+
26
+ ## Load (pure PyTorch, no transformers)
27
+ ```python
28
+ import json, torch
29
+ from huggingface_hub import hf_hub_download
30
+ from localagent.model import LocalAgentLM, ModelConfig
31
+
32
+ cfg_d = json.load(open(hf_hub_download("danelcsb/localagent-ultra-tiny-1m", "config.json")))
33
+ cfg = ModelConfig(**{k: v for k, v in cfg_d.items() if k in ModelConfig.__dataclass_fields__})
34
+ model = LocalAgentLM(cfg)
35
+ from safetensors.torch import load_file
36
+ model.load_state_dict(load_file(hf_hub_download("danelcsb/localagent-ultra-tiny-1m", "model.safetensors")))
37
+ model.eval()
38
+ ```
39
+ See the LocalAgent repo for the grounded decoder / agent runtime.
agent_heads.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcbe81933ca0de9c0c543a31d14c631b0f07129ccfb8046e04e0a94a50a0a66f
3
+ size 327813
config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "localagent",
3
+ "architecture": "LocalAgentLM (byte-level GQA+RoPE+SwiGLU)",
4
+ "name": "ultra-tiny-1m",
5
+ "vocab_size": 256,
6
+ "d_model": 192,
7
+ "embed_dim": 64,
8
+ "n_layers": 2,
9
+ "n_loops": 6,
10
+ "n_heads": 6,
11
+ "n_kv_heads": 2,
12
+ "ffn_hidden": 640,
13
+ "max_seq_len": 1024,
14
+ "rope_theta": 10000.0,
15
+ "norm_eps": 1e-05,
16
+ "tie_embeddings": true,
17
+ "dropout": 0.0
18
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:042e13cf2f5e878b0cdd05840f20fffeefee0d09794ad7663d6d91196c7e2add
3
+ size 3909888