Instructions to use xingyushenai/CL-BLD-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xingyushenai/CL-BLD-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xingyushenai/CL-BLD-1B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("xingyushenai/CL-BLD-1B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xingyushenai/CL-BLD-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xingyushenai/CL-BLD-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xingyushenai/CL-BLD-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xingyushenai/CL-BLD-1B
- SGLang
How to use xingyushenai/CL-BLD-1B 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 "xingyushenai/CL-BLD-1B" \ --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": "xingyushenai/CL-BLD-1B", "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 "xingyushenai/CL-BLD-1B" \ --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": "xingyushenai/CL-BLD-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xingyushenai/CL-BLD-1B with Docker Model Runner:
docker model run hf.co/xingyushenai/CL-BLD-1B
CL-BLD-1B
CL-BLD-1B is a KDA hybrid language model released with Competing Learning in Hybrid Architectures.
Recurrent mixers and softmax attention can compete over retrieval. When recurrent layers acquire retrieval earlier, attention receives less learning signal to develop the same ability.
Better Layer Division (BLD) gives attention an earlier opportunity to learn retrieval by freezing entire recurrent blocks during early pretraining. Their mixer, MLP, and normalization are held fixed, while attention blocks, embeddings, and the final normalization keep training. All blocks are later unfrozen for continued pretraining, maintaining the division of labor between attention and recurrence.
This is a base language model. It was pretrained on DCLM and is not instruction tuned.
Model details
| Field | Value |
|---|---|
| Total unique parameters, including embeddings | 1,014,512,856 |
| Shared input embedding / LM-head parameters | 235,008,000 (counted once) |
| Non-embedding parameters | 779,504,856 |
| Published size label | 1B |
| Hidden layers | 24 |
| Hidden width | 1536 |
| Vocabulary size | 153000 |
| Attention layer indices (zero based) | [0, 4, 8, 12, 16, 20] |
| Block pattern | Attention β Recurrent β Recurrent β Recurrent |
| Position encoding | NoPE |
| Training corpus | DCLM |
| Checkpoint | Final pretrained weights |
| Total tokens implied by recorded update counts | 17,600,348,160 |
The published names use the established rounded total-parameter labels. Exact counts are given above. The checkpoint is copied byte for byte from the original safetensors file, retaining BF16 weights and FP32 auxiliary parameters.
Installation and loading
Use Linux, an NVIDIA GPU with BF16 support, and a CUDA-enabled environment.
The validated environment and installation commands are recorded in ENVIRONMENT.md.
This custom architecture requires the included Python files and trust_remote_code=True.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "xingyushenai/CL-BLD-1B"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
).to("cuda").eval()
inputs = tokenizer("The capital of France is", return_tensors="pt").to("cuda")
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=32, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Provenance and validation
provenance.json records checkpoint provenance, exact parameter counts, training updates, and the weight SHA-256.
validation.json records release smoke tests; these tests are not a benchmark rerun.
Input embeddings and the output head share one parameter and must not be counted twice.
For the method, training setup, and evaluation instructions, see the Competing Learning repository.
- Downloads last month
- 61