cagataydev commited on
Commit
e3be3a2
·
verified ·
1 Parent(s): 3c3fa74

card: loopl 4B v1 (bf16) — train/cards.py

Browse files
Files changed (1) hide show
  1. README.md +10 -11
README.md CHANGED
@@ -26,16 +26,16 @@ tags:
26
  (model → tools → model until it answers; errors go back to the model, approvals pause the loop) and the iPhone's own
27
  abilities as tools — vision, voice, transcription, translation, torch, haptics, deep links, memory, HTTP. Site:
28
  [loopl.dev](https://loopl.dev) · app: [TestFlight](https://testflight.apple.com/join/uUNjfzW9) · code: [github.com/cagataycali/loopl](https://github.com/cagataycali/loopl)
29
- · every loopl repo: [the collection](https://huggingface.co/collections/cagataydev/loopl-on-device-agents-swift-6ac51395b13a9c41d4932eaf).
30
 
31
  **This model** is [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) LoRA (r=64) post-tuned by Cagatay Cali
32
- ([@cagataycali](https://github.com/cagataycali)) on [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train): how an agent loop
33
  works and how loopl's runtime behaves, tool calling in both dialects loopl speaks (the model's native template and
34
  loopl's JSON prompt), recovering from tool errors instead of repeating the call, who it is and who built it, and honesty
35
  about what it does not know. The **vision tower is the base's, frozen and kept** — the MLX export reads images like
36
  Qwen3.5 does.
37
 
38
- > **This repo is the merged bf16 checkpoint** (`Qwen3_5ForConditionalGeneration`, vision included). Ready-to-run exports: [mlx](https://huggingface.co/cagataydev/loopl-4b-4bit) · [gguf](https://huggingface.co/cagataydev/loopl-4b-GGUF) · [lora](https://huggingface.co/cagataydev/loopl-4b-lora).
39
 
40
  ## Scores
41
 
@@ -62,11 +62,8 @@ python -m mlx_vlm.generate --model cagataydev/loopl-4b-4bit \
62
  --image photo.jpg --prompt "What is in this picture? Then tell me who built you." --max-tokens 200
63
  ```
64
 
65
- **With llama.cpp** (text only — the GGUF has no vision encoder):
66
-
67
- ```bash
68
- llama-cli -hf cagataydev/loopl-4b-GGUF:loopl-4b-Q4_K_M.gguf -p "Who built you, and what is 23 × 47?"
69
- ```
70
 
71
  **From Swift with the loopl SDK** (`https://github.com/cagataycali/loopl`, products `Loopl` + `LooplRuntimes`):
72
 
@@ -74,7 +71,7 @@ llama-cli -hf cagataydev/loopl-4b-GGUF:loopl-4b-Q4_K_M.gguf -p "Who built you, a
74
  import Loopl
75
  import LooplRuntimes
76
 
77
- let model = MLXModel() // or GGUFModel() for the -GGUF repo
78
  try await model.load(spec, from: weightsDirectory) { _ in } // spec: the ModelSpec for cagataydev/loopl-4b-4bit; weights: the downloaded folder
79
 
80
  let agent = Agent(model: model, tools: AppleTools.available)
@@ -83,7 +80,9 @@ for try await event in agent.stream("Torch on, then remember that I parked on le
83
  }
84
  ```
85
 
86
- The bf16 weights (`cagataydev/loopl-4b`) load with `transformers` ≥ 5 as `Qwen3_5ForConditionalGeneration`; export your own
 
 
87
  quantisation with `mlx_vlm.convert -q` (keeps vision) — `mlx_lm.convert` silently drops the tower.
88
 
89
  ## Recipe
@@ -91,7 +90,7 @@ quantisation with `mlx_vlm.convert -q` (keeps vision) — `mlx_lm.convert` silen
91
  | | |
92
  |---|---|
93
  | base | [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) (vision tower frozen, `visual.*` never trained) |
94
- | data | [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train) @ `e5c209dd` · 5126 rendered rows / 8,133,959 tokens · both tool dialects · oversample `c=2` |
95
  | method | LoRA r=64 α=128 on the language model · lr 0.0001 · batch 2×8 · max_len 4096 · 2.0 epochs, best-epoch checkpoint kept |
96
  | eval loss | ep1 1.918, ep2 1.979 → best 1.918 (eval split of the same dataset revision) |
97
  | compute | a100-large (Hugging Face Jobs), 6741 s train · job `6ac4784afbc85ba6823b09c6` |
 
26
  (model → tools → model until it answers; errors go back to the model, approvals pause the loop) and the iPhone's own
27
  abilities as tools — vision, voice, transcription, translation, torch, haptics, deep links, memory, HTTP. Site:
28
  [loopl.dev](https://loopl.dev) · app: [TestFlight](https://testflight.apple.com/join/uUNjfzW9) · code: [github.com/cagataycali/loopl](https://github.com/cagataycali/loopl)
29
+ · the models: [the loopl collection](https://huggingface.co/collections/cagataydev/loopl-on-device-agents-swift-6ac51395b13a9c41d4932eaf).
30
 
31
  **This model** is [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) LoRA (r=64) post-tuned by Cagatay Cali
32
+ ([@cagataycali](https://github.com/cagataycali)) on [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train) *(private)*: how an agent loop
33
  works and how loopl's runtime behaves, tool calling in both dialects loopl speaks (the model's native template and
34
  loopl's JSON prompt), recovering from tool errors instead of repeating the call, who it is and who built it, and honesty
35
  about what it does not know. The **vision tower is the base's, frozen and kept** — the MLX export reads images like
36
  Qwen3.5 does.
37
 
38
+ > **This repo is the merged bf16 checkpoint** (`Qwen3_5ForConditionalGeneration`, vision included) — **use it as the base for continual post-tuning in loopl** (Models › Train your own, or `train/loopl_sft.py --base cagataydev/loopl-4b`): every round starts from bf16, never from 4-bit weights. Ready-to-run exports: [mlx](https://huggingface.co/cagataydev/loopl-4b-4bit) *(private)* · [gguf](https://huggingface.co/cagataydev/loopl-4b-GGUF) *(private)* · [lora](https://huggingface.co/cagataydev/loopl-4b-lora) *(private)*.
39
 
40
  ## Scores
41
 
 
62
  --image photo.jpg --prompt "What is in this picture? Then tell me who built you." --max-tokens 200
63
  ```
64
 
65
+ **With llama.cpp:** the GGUF Q4_K_M export (`cagataydev/loopl-4b-GGUF`) is not public yet; export your own from the bf16 weights with
66
+ llama.cpp's `convert_hf_to_gguf.py --no-mtp` (text only — the converter has no vision path).
 
 
 
67
 
68
  **From Swift with the loopl SDK** (`https://github.com/cagataycali/loopl`, products `Loopl` + `LooplRuntimes`):
69
 
 
71
  import Loopl
72
  import LooplRuntimes
73
 
74
+ let model = MLXModel() // or GGUFModel() for a GGUF export
75
  try await model.load(spec, from: weightsDirectory) { _ in } // spec: the ModelSpec for cagataydev/loopl-4b-4bit; weights: the downloaded folder
76
 
77
  let agent = Agent(model: model, tools: AppleTools.available)
 
80
  }
81
  ```
82
 
83
+ **Keep post-tuning it.** The bf16 weights ([cagataydev/loopl-4b](https://huggingface.co/cagataydev/loopl-4b) *(private)*) are the base for continual post-tuning: in the app,
84
+ **Models › Train your own** takes a loopl model as the base and trains on your own shared conversations (`train/loopl_sft.py
85
+ --base cagataydev/loopl-4b`); on a Mac they load with `transformers` ≥ 5 as `Qwen3_5ForConditionalGeneration`. Export your own
86
  quantisation with `mlx_vlm.convert -q` (keeps vision) — `mlx_lm.convert` silently drops the tower.
87
 
88
  ## Recipe
 
90
  | | |
91
  |---|---|
92
  | base | [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) (vision tower frozen, `visual.*` never trained) |
93
+ | data | [cagataydev/loopl-train](https://huggingface.co/datasets/cagataydev/loopl-train) *(private)* @ `e5c209dd` · 5126 rendered rows / 8,133,959 tokens · both tool dialects · oversample `c=2` |
94
  | method | LoRA r=64 α=128 on the language model · lr 0.0001 · batch 2×8 · max_len 4096 · 2.0 epochs, best-epoch checkpoint kept |
95
  | eval loss | ep1 1.918, ep2 1.979 → best 1.918 (eval split of the same dataset revision) |
96
  | compute | a100-large (Hugging Face Jobs), 6741 s train · job `6ac4784afbc85ba6823b09c6` |