cagataydev commited on
Commit
c34864e
·
verified ·
1 Parent(s): 5a7c7d7

card: loopl 2B v1.1 (mlx) — train/cards.py

Browse files
Files changed (1) hide show
  1. README.md +13 -17
README.md CHANGED
@@ -21,7 +21,6 @@ tags:
21
  - vision
22
  - image-text-to-text
23
  - 4-bit
24
- - v1.1
25
  ---
26
  # loopl 2B · v1.1
27
 
@@ -29,18 +28,16 @@ tags:
29
  (model → tools → model until it answers; errors go back to the model, approvals pause the loop) and the iPhone's own
30
  abilities as tools — vision, voice, transcription, translation, torch, haptics, deep links, memory, HTTP. Site:
31
  [loopl.dev](https://loopl.dev) · app: [TestFlight](https://testflight.apple.com/join/uUNjfzW9) · code: [github.com/cagataycali/loopl](https://github.com/cagataycali/loopl)
32
- · every loopl repo: [the collection](https://huggingface.co/collections/cagataydev/loopl-on-device-agents-swift-6ac51395b13a9c41d4932eaf).
33
 
34
  **This model** is [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) fully fine-tuned by Cagatay Cali
35
- ([@cagataycali](https://github.com/cagataycali)) on [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train): how an agent loop
36
  works and how loopl's runtime behaves, tool calling in both dialects loopl speaks (the model's native template and
37
  loopl's JSON prompt), recovering from tool errors instead of repeating the call, who it is and who built it, and honesty
38
  about what it does not know. The **vision tower is the base's, frozen and kept** — the MLX export reads images like
39
  Qwen3.5 does.
40
 
41
- > **This repo is the MLX 4-bit export (group 64)** the loopl app downloads — 1.72 GB, 297 `vision_tower.*` tensors of 991 so it reads images, same layout as [mlx-community/Qwen3.5-2B-4bit](https://huggingface.co/mlx-community/Qwen3.5-2B-4bit). bf16 weights: [cagataydev/loopl-2b](https://huggingface.co/cagataydev/loopl-2b).
42
-
43
- > ⚠️ **Staging copy of v1.1.** When a version wins every gate it is promoted onto [cagataydev/loopl-2b](https://huggingface.co/cagataydev/loopl-2b) (and its `-4bit` / `-GGUF`), which is what the app's catalog tracks. Use that one unless you are comparing versions.
44
 
45
  ## Scores
46
 
@@ -57,9 +54,9 @@ Scored by `train/eval.py` on the 4-bit MLX export (greedy). The quiz asks for ex
57
 
58
  ## Use it today
59
 
60
- **In the loopl app (iPhone).** Install from [TestFlight](https://testflight.apple.com/join/uUNjfzW9) → Settings › Hugging Face › sign in with a token that
61
- can read this repo → Models › **Mine** → download. The app picks the MLX export, sees the vision tower and shows the photo
62
- button; GGUF rows run on llama.cpp (text only). A public repo also appears under Models › Browse with no token.
63
 
64
  **On a Mac with MLX** (vision included):
65
 
@@ -69,11 +66,8 @@ python -m mlx_vlm.generate --model cagataydev/loopl-2b-4bit \
69
  --image photo.jpg --prompt "What is in this picture? Then tell me who built you." --max-tokens 200
70
  ```
71
 
72
- **With llama.cpp** (text only — the GGUF has no vision encoder):
73
-
74
- ```bash
75
- llama-cli -hf cagataydev/loopl-2b-GGUF:loopl-2b-Q4_K_M.gguf -p "Who built you, and what is 23 × 47?"
76
- ```
77
 
78
  **From Swift with the loopl SDK** (`https://github.com/cagataycali/loopl`, products `Loopl` + `LooplRuntimes`):
79
 
@@ -81,7 +75,7 @@ llama-cli -hf cagataydev/loopl-2b-GGUF:loopl-2b-Q4_K_M.gguf -p "Who built you, a
81
  import Loopl
82
  import LooplRuntimes
83
 
84
- let model = MLXModel() // or GGUFModel() for the -GGUF repo
85
  try await model.load(spec, from: weightsDirectory) { _ in } // spec: the ModelSpec for cagataydev/loopl-2b-4bit; weights: the downloaded folder
86
 
87
  let agent = Agent(model: model, tools: AppleTools.available)
@@ -90,7 +84,9 @@ for try await event in agent.stream("Torch on, then remember that I parked on le
90
  }
91
  ```
92
 
93
- The bf16 weights (`cagataydev/loopl-2b`) load with `transformers` ≥ 5 as `Qwen3_5ForConditionalGeneration`; export your own
 
 
94
  quantisation with `mlx_vlm.convert -q` (keeps vision) — `mlx_lm.convert` silently drops the tower.
95
 
96
  ## Recipe
@@ -98,7 +94,7 @@ quantisation with `mlx_vlm.convert -q` (keeps vision) — `mlx_lm.convert` silen
98
  | | |
99
  |---|---|
100
  | base | [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) (vision tower frozen, `visual.*` never trained) |
101
- | data | [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train) @ `db6fa452` · 10596 rendered rows / 16,710,241 tokens · both tool dialects · oversample `c=2` |
102
  | method | full fine-tune of the language model · lr 1.5e-05 · batch 2×8 · max_len 4096 · 2.0 epochs, best-epoch checkpoint kept |
103
  | eval loss | ep1 1.874, ep2 1.935 → best 1.874 (eval split of the same dataset revision) |
104
  | compute | a100-large (Hugging Face Jobs), 5789 s train · job `6ac4fa03404719ba3765fc09` |
 
21
  - vision
22
  - image-text-to-text
23
  - 4-bit
 
24
  ---
25
  # loopl 2B · v1.1
26
 
 
28
  (model → tools → model until it answers; errors go back to the model, approvals pause the loop) and the iPhone's own
29
  abilities as tools — vision, voice, transcription, translation, torch, haptics, deep links, memory, HTTP. Site:
30
  [loopl.dev](https://loopl.dev) · app: [TestFlight](https://testflight.apple.com/join/uUNjfzW9) · code: [github.com/cagataycali/loopl](https://github.com/cagataycali/loopl)
31
+ · the models: [the loopl collection](https://huggingface.co/collections/cagataydev/loopl-on-device-agents-swift-6ac51395b13a9c41d4932eaf).
32
 
33
  **This model** is [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) fully fine-tuned by Cagatay Cali
34
+ ([@cagataycali](https://github.com/cagataycali)) on [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train) *(private)*: how an agent loop
35
  works and how loopl's runtime behaves, tool calling in both dialects loopl speaks (the model's native template and
36
  loopl's JSON prompt), recovering from tool errors instead of repeating the call, who it is and who built it, and honesty
37
  about what it does not know. The **vision tower is the base's, frozen and kept** — the MLX export reads images like
38
  Qwen3.5 does.
39
 
40
+ > **This repo is the MLX 4-bit export (group 64) — the one the loopl app downloads** — 1.72 GB, 297 `vision_tower.*` tensors of 991 so it reads images, same layout as [mlx-community/Qwen3.5-2B-4bit](https://huggingface.co/mlx-community/Qwen3.5-2B-4bit). bf16 weights for continual post-tuning: [cagataydev/loopl-2b](https://huggingface.co/cagataydev/loopl-2b).
 
 
41
 
42
  ## Scores
43
 
 
54
 
55
  ## Use it today
56
 
57
+ **In the loopl app (iPhone).** Install from [TestFlight](https://testflight.apple.com/join/uUNjfzW9) → Models → the **loopl models** section lists this
58
+ size (no account, no token) → download. The app sees the vision tower and shows the photo button; the system prompt is yours to
59
+ edit — identity and tool manners are in the weights.
60
 
61
  **On a Mac with MLX** (vision included):
62
 
 
66
  --image photo.jpg --prompt "What is in this picture? Then tell me who built you." --max-tokens 200
67
  ```
68
 
69
+ **With llama.cpp:** the GGUF Q4_K_M export (`cagataydev/loopl-2b-GGUF`) is not public yet; export your own from the bf16 weights with
70
+ llama.cpp's `convert_hf_to_gguf.py --no-mtp` (text only — the converter has no vision path).
 
 
 
71
 
72
  **From Swift with the loopl SDK** (`https://github.com/cagataycali/loopl`, products `Loopl` + `LooplRuntimes`):
73
 
 
75
  import Loopl
76
  import LooplRuntimes
77
 
78
+ let model = MLXModel() // or GGUFModel() for a GGUF export
79
  try await model.load(spec, from: weightsDirectory) { _ in } // spec: the ModelSpec for cagataydev/loopl-2b-4bit; weights: the downloaded folder
80
 
81
  let agent = Agent(model: model, tools: AppleTools.available)
 
84
  }
85
  ```
86
 
87
+ **Keep post-tuning it.** The bf16 weights ([cagataydev/loopl-2b](https://huggingface.co/cagataydev/loopl-2b)) are the base for continual post-tuning: in the app,
88
+ **Models › Train your own** takes a loopl model as the base and trains on your own shared conversations (`train/loopl_sft.py
89
+ --base cagataydev/loopl-2b`); on a Mac they load with `transformers` ≥ 5 as `Qwen3_5ForConditionalGeneration`. Export your own
90
  quantisation with `mlx_vlm.convert -q` (keeps vision) — `mlx_lm.convert` silently drops the tower.
91
 
92
  ## Recipe
 
94
  | | |
95
  |---|---|
96
  | base | [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) (vision tower frozen, `visual.*` never trained) |
97
+ | data | [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train) *(private)* @ `db6fa452` · 10596 rendered rows / 16,710,241 tokens · both tool dialects · oversample `c=2` |
98
  | method | full fine-tune of the language model · lr 1.5e-05 · batch 2×8 · max_len 4096 · 2.0 epochs, best-epoch checkpoint kept |
99
  | eval loss | ep1 1.874, ep2 1.935 → best 1.874 (eval split of the same dataset revision) |
100
  | compute | a100-large (Hugging Face Jobs), 5789 s train · job `6ac4fa03404719ba3765fc09` |