HuggingFaceFW/fineweb-edu
Viewer • Updated • 3.5B • 619k • 1.1k
How to use deqing/convergent-mamba2-300M-adamw-original with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="deqing/convergent-mamba2-300M-adamw-original") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("deqing/convergent-mamba2-300M-adamw-original")
model = AutoModelForCausalLM.from_pretrained("deqing/convergent-mamba2-300M-adamw-original")How to use deqing/convergent-mamba2-300M-adamw-original with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "deqing/convergent-mamba2-300M-adamw-original"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "deqing/convergent-mamba2-300M-adamw-original",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/deqing/convergent-mamba2-300M-adamw-original
How to use deqing/convergent-mamba2-300M-adamw-original with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "deqing/convergent-mamba2-300M-adamw-original" \
--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": "deqing/convergent-mamba2-300M-adamw-original",
"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 "deqing/convergent-mamba2-300M-adamw-original" \
--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": "deqing/convergent-mamba2-300M-adamw-original",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use deqing/convergent-mamba2-300M-adamw-original with Docker Model Runner:
docker model run hf.co/deqing/convergent-mamba2-300M-adamw-original
A 300M-parameter language model trained from scratch on FineWeb-Edu 10BT (~9.4B tokens, 1 epoch) as part of the Convergent Evolution project, which investigates how Fourier features emerge in LLM number embeddings.
| Architecture | Mamba-2 SSM (state-space model) |
| Parameters | ~300M |
| Optimizer | AdamW |
| Data perturbation | standard (unperturbed) text |
| Training data | FineWeb-Edu sample-10BT (~9.4B tokens) |
| Context length | 1024 |
| Tokenizer | Llama 3 (128K vocab) |
| Batch size | 512 sequences |
Intermediate checkpoints are saved as branches: tokens-200M, tokens-400M, ..., tokens-9.6B.
from transformers import AutoModelForCausalLM
# Load final checkpoint
model = AutoModelForCausalLM.from_pretrained("deqing/convergent-mamba2-300M-adamw-original")
# Load intermediate checkpoint (e.g., at 1B tokens)
model = AutoModelForCausalLM.from_pretrained("deqing/convergent-mamba2-300M-adamw-original", revision="tokens-1B")
Paper forthcoming.