sabeshbesh commited on
Commit
dca9aff
·
verified ·
1 Parent(s): 65a4a2a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +122 -33
README.md CHANGED
@@ -2,51 +2,140 @@
2
  library_name: mlx
3
  license: other
4
  license_name: lfm1.0
5
- license_link: LICENSE
6
- language:
7
- - en
8
- - ar
9
- - zh
10
- - fr
11
- - de
12
- - ja
13
- - ko
14
- - es
15
- - pt
16
- - it
17
  pipeline_tag: text-generation
 
 
18
  tags:
19
- - liquid
20
- - lfm2.5
21
- - edge
22
- - mlx
23
- base_model: LiquidAI/LFM2.5-230M
 
24
  ---
25
 
26
- # sabeshbesh/pomo-1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- This model [sabeshbesh/pomo-1](https://huggingface.co/sabeshbesh/pomo-1) was
29
- converted to MLX format from [LiquidAI/LFM2.5-230M](https://huggingface.co/LiquidAI/LFM2.5-230M)
30
- using mlx-lm version **0.31.3**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
- ## Use with mlx
33
 
34
- ```bash
35
- pip install mlx-lm
36
  ```
37
 
 
 
38
  ```python
39
  from mlx_lm import load, generate
 
 
 
40
 
41
- model, tokenizer = load("sabeshbesh/pomo-1")
 
 
 
 
 
 
 
 
42
 
43
- prompt = "hello"
 
44
 
45
- if tokenizer.chat_template is not None:
46
- messages = [{"role": "user", "content": prompt}]
47
- prompt = tokenizer.apply_chat_template(
48
- messages, add_generation_prompt=True, return_dict=False,
49
- )
50
 
51
- response = generate(model, tokenizer, prompt=prompt, verbose=True)
52
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  library_name: mlx
3
  license: other
4
  license_name: lfm1.0
5
+ license_link: https://huggingface.co/LiquidAI/LFM2.5-230M/blob/main/LICENSE
6
+ base_model: LiquidAI/LFM2.5-230M
 
 
 
 
 
 
 
 
 
 
7
  pipeline_tag: text-generation
8
+ language:
9
+ - en
10
  tags:
11
+ - mlx
12
+ - lora
13
+ - tool-calling
14
+ - on-device
15
+ - lfm2.5
16
+ - edge
17
  ---
18
 
19
+ # pomo-1
20
+
21
+ A LoRA fine-tune of [LiquidAI/LFM2.5-230M](https://huggingface.co/LiquidAI/LFM2.5-230M)
22
+ for **on-device to-do tool-calling**. Given a short natural-language utterance and the
23
+ user's current to-do list, `pomo-1` emits a single structured tool call to create,
24
+ update, or delete a to-do. Built to run locally on Apple Silicon via MLX.
25
+
26
+ This is a task-specific model, not a general assistant. It does one thing: turn an
27
+ utterance + a small list of existing to-dos into one JSON tool call.
28
+
29
+ ## Intended use
30
+
31
+ - **In scope:** single-turn to-do CRUD intent → one tool call, on-device.
32
+ - **Out of scope:** multi-turn dialogue, reasoning, general chat, code, or any task
33
+ the base model is not recommended for (advanced math, code generation, creative
34
+ writing). Inherits the base model's limits.
35
 
36
+ ## Tools
37
+
38
+ | tool | arguments |
39
+ |---|---|
40
+ | `create_todo` | `title` (str), `due` (str \| null) — ignores the current list |
41
+ | `update_todo` | `target` (str), `title` (str \| null), `due` (str \| null) |
42
+ | `delete_todo` | `target` (str) |
43
+ | `none` | `{}` — emitted when the referenced to-do is not in the list |
44
+
45
+ For `update_todo` / `delete_todo`, `target` is a **verbatim copy** of one item in the
46
+ provided list. If the referenced item is absent, the model emits `none`.
47
+
48
+ ## Prompt format
49
+
50
+ The current to-do list (0–5 items) is injected into the prompt. Training and inference
51
+ must use this exact layout:
52
+
53
+ ```
54
+ Todos:
55
+ - <todo 1>
56
+ - <todo 2>
57
+
58
+ User: <utterance>
59
+ ```
60
 
61
+ An empty list renders as `Todos:\n(none)`. Output is a JSON string, e.g.:
62
 
63
+ ```json
64
+ {"name":"delete_todo","arguments":{"target":"Book the moving truck"}}
65
  ```
66
 
67
+ ## Usage (MLX)
68
+
69
  ```python
70
  from mlx_lm import load, generate
71
+ from mlx_lm.sample_utils import make_sampler
72
+
73
+ model, tokenizer = load("<YOUR_HF_REPO>") # e.g. sabeshbesh/pomo-1
74
 
75
+ prompt = "Todos:\n- Book the moving truck\n- Water the front yard plants\n\nUser: delete moving truck task"
76
+ tokens = tokenizer.apply_chat_template(
77
+ [{"role": "user", "content": prompt}],
78
+ add_generation_prompt=True, tokenize=True,
79
+ )
80
+ out = generate(model, tokenizer, prompt=tokens, max_tokens=96,
81
+ sampler=make_sampler(temp=0.0))
82
+ print(out) # {"name":"delete_todo","arguments":{"target":"Book the moving truck"}}
83
+ ```
84
 
85
+ Greedy decoding (`temp=0.0`) is recommended for deterministic tool calls. The base
86
+ model's general-purpose defaults are temperature 0.1, top_k 50, repetition_penalty 1.05.
87
 
88
+ ## Training
 
 
 
 
89
 
90
+ - **Base:** LiquidAI/LFM2.5-230M (LFM2 hybrid: 14 layers, 8 gated short-conv + 6 GQA).
91
+ - **Method:** LoRA SFT via `mlx_lm.lora`.
92
+ - **Adapter:** rank 16, scale 16, dropout 0.05, applied to all 14 layers; `mask_prompt: true`.
93
+ - **Data format:** legacy `{"prompt", "completion"}` JSONL; completion is a JSON-string
94
+ tool call.
95
+ - **Hardware:** Apple Silicon (MLX).
96
+
97
+ <!-- FILL: dataset size, iters, and final checkpoint used for this upload. -->
98
+
99
+ ## Evaluation
100
+
101
+ <!-- NOTE: numbers below are from the v1 dataset (list NOT in prompt). Replace with the
102
+ list-aware (v2) results before treating these as representative, and report on a
103
+ held-out test split, not the selection val set. -->
104
+
105
+ Held-out validation (n=300), best checkpoint, greedy decoding:
106
+
107
+ | metric | score |
108
+ |---|---|
109
+ | parse rate (valid JSON) | 1.000 |
110
+ | tool-name accuracy | 0.997 |
111
+ | argument exact-match | 0.563 |
112
+ | full match (name + args) | 0.563 |
113
+
114
+ Metric definitions: **parse rate** = fraction of outputs that are valid tool-call JSON;
115
+ **tool-name accuracy** = correct tool selected; **argument exact-match** = arguments
116
+ exactly correct; **full match** = both correct.
117
+
118
+ **Known limitation of this eval:** these figures were measured on a dataset variant
119
+ where the current to-do list was *not* included in the prompt, which makes correct
120
+ `target` selection for update/delete structurally impossible in many cases — the
121
+ argument/full-match scores are a floor, not a ceiling. No baseline comparison against
122
+ the prior model is included. Treat these numbers as provisional.
123
+
124
+ ## License
125
+
126
+ Governed by the base model's license, `lfm1.0`. See the
127
+ [base model license](https://huggingface.co/LiquidAI/LFM2.5-230M/blob/main/LICENSE).
128
+
129
+ ## Citation
130
+
131
+ Base model:
132
+
133
+ ```bibtex
134
+ @article{liquidAI2026230M,
135
+ author = {Liquid AI},
136
+ title = {LFM2.5-230M: Built to Run Anywhere},
137
+ journal = {Liquid AI Blog},
138
+ year = {2026},
139
+ note = {www.liquid.ai/blog/lfm2-5-230m}
140
+ }
141
+ ```