Text Generation
Transformers
Safetensors
bailing_hybrid
webbrain
ling-3.0
bailing-moe
looped-transformer
conversational
custom_code
Instructions to use webbrain-one/WebBrain-LingLoop-8B-A1.3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webbrain-one/WebBrain-LingLoop-8B-A1.3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webbrain-one/WebBrain-LingLoop-8B-A1.3B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("webbrain-one/WebBrain-LingLoop-8B-A1.3B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("webbrain-one/WebBrain-LingLoop-8B-A1.3B", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use webbrain-one/WebBrain-LingLoop-8B-A1.3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webbrain-one/WebBrain-LingLoop-8B-A1.3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/WebBrain-LingLoop-8B-A1.3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/webbrain-one/WebBrain-LingLoop-8B-A1.3B
- SGLang
How to use webbrain-one/WebBrain-LingLoop-8B-A1.3B 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 "webbrain-one/WebBrain-LingLoop-8B-A1.3B" \ --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": "webbrain-one/WebBrain-LingLoop-8B-A1.3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "webbrain-one/WebBrain-LingLoop-8B-A1.3B" \ --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": "webbrain-one/WebBrain-LingLoop-8B-A1.3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use webbrain-one/WebBrain-LingLoop-8B-A1.3B with Docker Model Runner:
docker model run hf.co/webbrain-one/WebBrain-LingLoop-8B-A1.3B
Add
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071---base_model: inclusionAI/Ling-3.0-tinylibrary_name: transformerspipeline_tag: text-generationtags: - webbrain - moe - ling-3.0 - looped-transformer - test-time-compute---
# WebBrain-LingLoop-8B-A1.3B
`WebBrain-LingLoop-8B-A1.3B`, `inclusionAI/Ling-3.0-tiny` üzerine 2-pass looped depth ekleyen bir deneysel modelidir. Ana ağırlıklar donmuştur; core katmanlar (`4..19`) iki kez çalıştırılır ve 16 katman için reader/gate tabanlı lightweight adapter eklenir.
- Core: `loop_core_start=4`, `loop_core_end=20`, `loop_num_passes=2`, `loop_gate_rank=64`- Adapter: `128` tensor, `12,632,064` trainable parameter- GGUF: [`webbrain-one/WebBrain-LingLoop-8B-A1.3B-GGUF`](https://huggingface.co/webbrain-one/WebBrain-LingLoop-8B-A1.3B-GGUF)
## Quickstart
```pythonimport torchfrom transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "webbrain-one/WebBrain-LingLoop-8B-A1.3B"tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( repo_id, trust_remote_code=True, attn_implementation="eager", torch_dtype="auto", device_map={"": "cuda:0"},).eval()
prompt = "Question: What is 17 times 23? Answer:"enc = tokenizer(prompt, return_tensors="pt")enc.pop("token_type_ids", None)enc = enc.to(model.device)with torch.no_grad(): out = model.generate(**enc, max_new_tokens=32, do_sample=False)print(tokenizer.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))```
Batched evaluation sırasında Ling KDA mask fixing gereklidir; tek örnekli generation için gerekli değildir.
## Benchmarks
Greedy decoding, sabit test splitleri ve aynı token bütçeleriyle:
| Benchmark (n) | Stock No-CoT | Looped No-CoT | Stock Short-192 | Looped Short-192 ||---|---:|---:|---:|---:|| Math500 (250) | 27.20 | **30.80** | 37.20 | **43.60** || MMLU-Pro STEM (250) | 8.80 | **44.40** | 10.00 | **41.60** || GSM8K (200) | 27.00 | **35.00** | 65.50 | **78.00** || LongBench v2 (100) | 9.00 | **33.00** | 8.00 | **34.00** || ARC-AGI-50 pilot | 6.00 | **10.00** | 2.00 | **4.00** || AIME-60 pilot | 0.00 | 0.00 | 0.00 | 0.00 |
### SenseNova ile karşılaştırma
| Benchmark | Looped No-CoT | SenseNova No-CoT | Looped Short-192 | SenseNova Short-192 ||---|---:|---:|---:|---:|| Math500 | **30.80** | 24.80 | **43.60** | 22.00 || MMLU-Pro | 44.40 | 44.40 | **41.60** | 12.80 || GSM8K | **35.00** | 30.00 | **78.00** | 67.00 || LongBench v2 | 33.00 | **40.00** | 34.00 | — || ARC-AGI-50 | 10.00 | **12.00** | **4.00** | 0.00 |
Bu model deneyseldir; üretim kullanımı için bağımsız doğrulama önerilir.README.mdAdded+71