Image-Text-to-Text
Transformers
Safetensors
English
Turkish
qwen3_5
loopl
on-device
agent
tool-calling
qwen3.5
sft
vision
conversational
Instructions to use cagataydev/loopl-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cagataydev/loopl-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cagataydev/loopl-4b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("cagataydev/loopl-4b") model = AutoModelForMultimodalLM.from_pretrained("cagataydev/loopl-4b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cagataydev/loopl-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cagataydev/loopl-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cagataydev/loopl-4b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/cagataydev/loopl-4b
- SGLang
How to use cagataydev/loopl-4b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cagataydev/loopl-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cagataydev/loopl-4b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cagataydev/loopl-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cagataydev/loopl-4b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use cagataydev/loopl-4b with Docker Model Runner:
docker model run hf.co/cagataydev/loopl-4b
loopl v1.2-c — promoted from cagataydev/loopl-4b-v1.2-c @ 966b2b1a (DATASET v2.2.1 rev 47d27b44: v2.2 with the full agentic critic: 23% of tool rows rejected for inventing owner facts or contradicting their own tool results); the previous version is the preceding commit
051d641 verified Download train_summary.json from cagataydev/loopl-4b: direct link, hf CLI and curl.
- Browser
- Download file 1.68 kB
-
https://huggingface.co/cagataydev/loopl-4b/resolve/main/train_summary.json
- Command line
-
hf download hf://cagataydev/loopl-4b/train_summary.json
-
curl -L -o train_summary.json https://huggingface.co/cagataydev/loopl-4b/resolve/main/train_summary.json
1.68 kB
| { | |
| "base": "Qwen/Qwen3.5-4B", | |
| "dataset": "cagataydev/loopl-train", | |
| "dataset_revision": "47d27b4415f8f9e35d352fdfecc02f551103366a", | |
| "split": "train", | |
| "families": null, | |
| "format": "both", | |
| "rows": 13704, | |
| "tokens": 37226229, | |
| "max_length": 4096, | |
| "lora": { | |
| "r": 64, | |
| "alpha": 128, | |
| "dropout": 0.05, | |
| "target_regex": ".*\\.language_model\\..*\\.(q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj|in_proj_qkvz|in_proj_ba|in_proj_qkv|in_proj_z|in_proj_b|in_proj_a|out_proj)" | |
| }, | |
| "epochs": 2.0, | |
| "max_steps": -1, | |
| "lr": 0.0001, | |
| "batch": 2, | |
| "grad_accum": 8, | |
| "oversample": "c=2", | |
| "best_checkpoint": "/tmp/loopl-sft/ckpt/checkpoint-857", | |
| "best_eval_loss": 1.4425023794174194, | |
| "eval_history": [ | |
| { | |
| "eval_loss": 1.4425023794174194, | |
| "epoch": 1.0 | |
| }, | |
| { | |
| "eval_loss": 1.508070945739746, | |
| "epoch": 2.0 | |
| }, | |
| { | |
| "eval_loss": 1.4425023794174194, | |
| "epoch": 2.0 | |
| } | |
| ], | |
| "metrics": { | |
| "train_runtime": 32074.0139, | |
| "train_samples_per_second": 0.855, | |
| "train_steps_per_second": 0.053, | |
| "total_flos": 2.231953474897576e+18, | |
| "train_loss": 0.8309779066327294, | |
| "epoch": 2.0, | |
| "eval_loss": 1.4425023794174194, | |
| "eval_runtime": 444.5352, | |
| "eval_samples_per_second": 3.109, | |
| "eval_steps_per_second": 0.389, | |
| "eval_entropy": 1.3332137045143657, | |
| "eval_num_tokens": 74452458.0, | |
| "eval_mean_token_accuracy": 0.6711968114610353 | |
| }, | |
| "data_stats": { | |
| "read": 8676, | |
| "rendered": 13704, | |
| "no_assistant": 1802, | |
| "render_error": 0, | |
| "truncated_hint": 1000, | |
| "tools_injected": 2778 | |
| }, | |
| "wall_s": 32755, | |
| "versions": { | |
| "transformers": "5.19.0", | |
| "trl": "1.14.2", | |
| "peft": "0.21.2", | |
| "torch": "2.14.1+cu130" | |
| }, | |
| "job_id": "6ac5e6f6404719ba3766544a" | |
| } |