HuggingFaceFW/fineweb-edu
Viewer • Updated • 3.5B • 434k • 1.38k
How to use nthngdy/cplm-baselines-135M with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="nthngdy/cplm-baselines-135M") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("nthngdy/cplm-baselines-135M", device_map="auto")How to use nthngdy/cplm-baselines-135M with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "nthngdy/cplm-baselines-135M"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "nthngdy/cplm-baselines-135M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/nthngdy/cplm-baselines-135M
How to use nthngdy/cplm-baselines-135M with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "nthngdy/cplm-baselines-135M" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "nthngdy/cplm-baselines-135M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "nthngdy/cplm-baselines-135M" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "nthngdy/cplm-baselines-135M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use nthngdy/cplm-baselines-135M with Docker Model Runner:
docker model run hf.co/nthngdy/cplm-baselines-135M
135M-parameter vanilla language models used as baselines in the paper Copy-Paste Language Models (Nathan Godey & Yoav Artzi, Cornell University). Paper
The Copy-Paste counterparts (CPLMs), trained with the exact same recipe, are available at nthngdy/cplm-135M.
Each model is stored on its own branch. Three backbones are available:
| Backbone | Description |
|---|---|
full |
Full attention in all 30 layers |
hybrid |
3 sliding-window (w=256) layers for every full-attention layer |
sw |
Sliding-window attention (w=256) in all layers |
These are the final checkpoints (20B tokens, step 19,000, after the LR cooldown).
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "nthngdy/cplm-baselines-135M"
tok = AutoTokenizer.from_pretrained(repo, revision="full")
model = AutoModelForCausalLM.from_pretrained(repo, revision="full")
ids = tok("The capital of France is", return_tensors="pt").input_ids
print(tok.decode(model.generate(ids, max_new_tokens=32)[0]))
@misc{godey2026copypastelanguagemodels,
title={Copy-Paste Language Models},
author={Nathan Godey and Yoav Artzi},
year={2026},
eprint={2610.19247},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2610.19247},
}