Views
No views yet
coolpoodle/Qwen3-0.6B-Looped
Base Model: Qwen/Qwen3-0.6B| Model | Validation Loss | Perplexity (PPL) |
|---|---|---|
| Baseline Qwen3-0.6B | 3.7274 | 41.57 |
| Loop Run1 (Epoch 3) | 3.5549 | 35.01 |
| Loop Run2 (Epoch 1) | 3.6434 | 38.22 |
| Loop Run2 (Epoch 2) | 3.5936 | 36.37 |
| Loop Run2 (Epoch 3) | 3.5642 | 35.31 |
transformers.
Note: trust_remote_code=True is required because this model uses a custom architecture (Qwen3LoopForCausalLM).1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "coolpoodle/Qwen3-0.6B-Looped"
5
6print("Loading model...")
7# trust_remote_code=True is essential for the custom architecture
8model = AutoModelForCausalLM.from_pretrained(
9 model_id,
10 trust_remote_code=True,
11 torch_dtype=torch.float16,
12 device_map="auto"
13)
14
15tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
16
17# Prompt
18prompt = "The future of artificial intelligence is"
19inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
20
21# Generate
22# use_cache=False is RECOMMENDED for Loop Attention to fully activate its mixing logic during generation
23print("Generating...")
24with torch.no_grad():
25 outputs = model.generate(
26 **inputs,
27 max_new_tokens=100,
28 do_sample=True,
29 temperature=0.7,
30 use_cache=False
31 )
32
33print("-" * 20)
34print(tokenizer.decode(outputs[0], skip_special_tokens=True))
35print("-" * 20)Qwen3-0.6B-Looped-Run2-Final.bin: The main model weights.modeling_qwen_loop.py: The custom model code.pytorch_model.bin.index.json: Maps the custom weight file for seamless loading.1@misc{qwen3-looped,
2 author = {coolpoodle},
3 title = {Qwen3-0.6B-Looped},
4 year = {2026},
5 publisher = {Hugging Face},
6 journal = {Hugging Face Model Hub},
7 howpublished = {\url{https://huggingface.co/coolpoodle/Qwen3-0.6B-Looped}}
8}