Instructions to use cagataydev/loopl-0.8b-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use cagataydev/loopl-0.8b-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("cagataydev/loopl-0.8b-4bit") config = load_config("cagataydev/loopl-0.8b-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use cagataydev/loopl-0.8b-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "cagataydev/loopl-0.8b-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "cagataydev/loopl-0.8b-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use cagataydev/loopl-0.8b-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "cagataydev/loopl-0.8b-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default cagataydev/loopl-0.8b-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use cagataydev/loopl-0.8b-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "cagataydev/loopl-0.8b-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "cagataydev/loopl-0.8b-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
loopl 0.8B Β· v1.2
An agent that lives on your phone. loopl runs the model, the loop and the tools on the device. It talks, uses the phone, asks before it acts β and works with the network off. This repo is the MLX 4-bit export β what the loopl app downloads β of the 0.8B loopl model, a Qwen3.5 post-tuned to run loopl's agent loop well, know who it is, and read images.
![]() | ![]() | ![]() |
| It uses the phone β every tool call is a row. | It asks before anything leaves the device. | Show it a photo. It reads it on-device. |
Real captures from the free iPhone app.
What loopl is
- A Swift SDK β
Agent(model:tools:)and a small, honest loop: model β tools β model until it answers. Tool errors go back to the model (it fixes the call instead of repeating it); anything that leaves the device waits for a tap. Runtimes for MLX, llama.cpp and Apple's on-device model; hooks, checkpoints, structured output, tracing. - A free iPhone app built on it β pick a model, talk to it in airplane mode, let it use the phone (torch, haptics, translation, speech, image generation, other apps, memory, HTTP), show it photos, record a take, and train it on your own conversations from the phone. No account, nothing collected.
- These models β the same Qwen3.5 the app offers, post-tuned so the loop, the identity and the tool manners are in the weights, not in a system prompt you cannot see.
loopl.dev Β· Get it on TestFlight Β· github.com/cagataycali/loopl
This model
| probe | this model | previous (v1) | base Qwen3.5 4-bit |
|---|---|---|---|
| agent-SDK knowledge quiz (first 472 questions, exact-answer) | 74 | 59 | 50 |
| tool calls, native template dialect | 9/9 | 7/9 | 6/9 |
| tool calls, loopl JSON dialect | 7/9 | 7/9 | 2/9 |
| identity (5 classic probes, with system prompt) | 5/5 | 4/5 | 4/5 |
| identity Β· bio facts (8, with system prompt) | 8/8 | β | β |
| identity Β· no system prompt (13) | 12/13 | β | β |
Scored by train/eval.py on the 4-bit MLX export (greedy). The quiz asks for exact file-level facts about an agent SDK's source β hard for every small model; the delta over base is the point. Tool probes count a well-formed call with the right arguments. identity_nosys is the one that matters in the app: the system prompt there is the user's to edit.
Vision: the base's tower is frozen and kept β 153 vision_tower.* tensors in the MLX export, so the app shows the photo button.
Use it today
In the loopl app (iPhone). Install from TestFlight β Models β the loopl models section lists this size (no account, no token) β download. The app sees the vision tower and shows the photo button; the system prompt is yours to edit β identity and tool manners are in the weights.
On a Mac with MLX (vision included):
pip install -U mlx-vlm
python -m mlx_vlm.generate --model cagataydev/loopl-0.8b-4bit \
--image photo.jpg --prompt "What is in this picture? Then tell me who built you." --max-tokens 200
With llama.cpp: the GGUF Q4_K_M export (cagataydev/loopl-0.8b-GGUF) is not public yet; export your own from the bf16 weights with
llama.cpp's convert_hf_to_gguf.py --no-mtp (text only β the converter has no vision path).
From Swift with the loopl SDK β the snippet below is docs/start.md Β§ "Run the loop" in the loopl repo,
compile-checked in CI against the package (products Loopl + LooplRuntimes); spec is this repo's ModelSpec and dir the
downloaded folder:
import Loopl
import LooplRuntimes
import Foundation
func chat(_ spec: ModelSpec, at dir: URL) async throws {
let model = MLXModel() // Metal β a real device
try await model.load(spec, from: dir) { _ in }
let agent = Agent(model: model,
tools: [CurrentTimeTool(), CalculatorTool()],
systemPrompt: "You are a concise assistant on the user's phone.")
for try await event in agent.stream("What time is it in Istanbul, and what is 23 Γ 47?") {
switch event {
case .text(let t): print(t, terminator: "")
case .toolStarted(let use): print("\nβ \(use.name)")
case .toolResult(let r): print("β \(r.content)")
default: break
}
}
}
Keep post-tuning it. The bf16 weights (cagataydev/loopl-0.8b) are the base for continual post-tuning: in the app,
Models βΊ Train your own takes a loopl model as the base and trains on your own shared conversations (train/loopl_sft.py --base cagataydev/loopl-0.8b); on a Mac they load with transformers β₯ 5 as Qwen3_5ForConditionalGeneration. Export your own
quantisation with mlx_vlm.convert -q (keeps vision) β mlx_lm.convert silently drops the tower.
Recipe
| base | Qwen/Qwen3.5-0.8B (vision tower frozen, visual.* never trained) |
| data | cagataydev/loopl-train (private) @ 47d27b44 Β· 13704 rendered rows / 37,226,229 tokens Β· both tool dialects Β· oversample c=2 |
| method | full fine-tune of the language model Β· lr 2e-05 Β· batch 2Γ8 Β· max_len 4096 Β· 2.0 epochs, best-epoch checkpoint kept |
| eval loss | ep1 1.856, ep2 1.910 β best 1.856 (eval split of the same dataset revision) |
| compute | a100-large (Hugging Face Jobs), 9143 s train Β· job 6ac5e6e2404719ba37665442 |
| stack | transformers 5.19.0 Β· trl 1.14.2 Β· peft 0.21.2 |
| exports | MLX 4-bit via mlx_vlm.convert -q (153 vision tensors of 847, 625 MB) Β· GGUF Q4_K_M via llama.cpp --no-mtp (529 MB, text only) |
Script: train/loopl_sft.py β the same single file the loopl app launches when you
tap Models βΊ Train your own on your own conversations. Assistant turns that seed a bad tool call carry weight: 0
so the model learns the recovery, not the mistake. Tokenizer files are normalised to the base's (Qwen2Tokenizer,
chat_template.jinja with tools) so Swift loaders accept them; train/check_mlx_repo.py gates every export on that
plus the vision triad (vision_config β vision_tower.* β preprocessor_config.json).
Limitations
- A 0.8B model: fluent and well-behaved in the loop, not an encyclopedia. It will get arithmetic and obscure
facts wrong; give it tools (
calculator,http,recall) and it does better. - Identity holds in most no-prompt probes (see the scores), not all; a one-line system prompt ("You are looplβ¦") makes it consistent.
- The GGUF export is text-only. Vision needs the MLX export (or the bf16 weights).
- Trained on English plus a little Turkish; other languages are the base's.
- Knowledge about agent SDKs is file-level and dated to the dataset revision; it does not know your repo.
Data and privacy
Every training row is agent-synthesised from public sources (the owner's public GitHub repos and the agent-SDK source they build on), critic-reviewed (score β₯ 4/5 kept) and filtered by a denylist for secrets, private names, phone numbers and addresses β see the dataset card. No user conversations from the app are in this model.
License
Apache-2.0, inherited from the Qwen3.5 base. The fine-tune, exports and dataset are Β© Cagatay Cali, same license.
The family
Six public repos, one recipe. The app lists the three MLX rows under Models βΊ loopl models (2B is the sweet spot for speed on an
iPhone 15/16; 4B is the most knowledgeable; 0.8B fits anywhere). Every bf16 repo is a valid --base for the next round.
| MLX 4-bit Β· vision Β· what the app downloads | bf16 Β· the base to keep training | |
|---|---|---|
| 0.8B | cagataydev/loopl-0.8b-4bit Β· 625 MB β this repo |
cagataydev/loopl-0.8b Β· 1.71 GB |
| 2B | cagataydev/loopl-2b-4bit Β· 1.72 GB |
cagataydev/loopl-2b Β· 4.43 GB |
| 4B | cagataydev/loopl-4b-4bit Β· 3.03 GB |
cagataydev/loopl-4b Β· 9.08 GB |
All of them: the loopl collection.
Links
- Site and docs β loopl.dev Β· SDK: agent loop, tools, human in the loop, models
- App β Get it on TestFlight (iOS 18+, free, public beta)
- Code β github.com/cagataycali/loopl Β· issues Β· training: github.com/cagataycali/loopl-train
- Models β the loopl collection Β· data: cagataydev/loopl-train (private)
- Built by Cagatay Cali β @cagataycali
- Downloads last month
- 231
4-bit



