Text Generation
Transformers
Safetensors
English
llama
pretraining
pretrained
base-model
text-generation-inference
Instructions to use kenpeter123/small-1b-pretrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kenpeter123/small-1b-pretrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kenpeter123/small-1b-pretrain")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kenpeter123/small-1b-pretrain") model = AutoModelForCausalLM.from_pretrained("kenpeter123/small-1b-pretrain", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kenpeter123/small-1b-pretrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kenpeter123/small-1b-pretrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kenpeter123/small-1b-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kenpeter123/small-1b-pretrain
- SGLang
How to use kenpeter123/small-1b-pretrain 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 "kenpeter123/small-1b-pretrain" \ --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": "kenpeter123/small-1b-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "kenpeter123/small-1b-pretrain" \ --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": "kenpeter123/small-1b-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kenpeter123/small-1b-pretrain with Docker Model Runner:
docker model run hf.co/kenpeter123/small-1b-pretrain
Small-1B Pretraining Model
Pretraining model (base, no SFT/alignment) — 1B Transformer++ trained from scratch (next-token prediction on quality-filtered tiered data: math, web, code, synth, reformat + gold set).
| Spec | Value |
|---|---|
| Params | 1,031,898,624 (~1.03B) |
| Hidden | 1536 · 32 layers · 12 attn heads · 4 KV (GQA) · head_dim 128 |
| FFN | 4608 SwiGLU |
| Seq len | 2048 (train) / 8192 (config) |
| Vocab | 49152 (SmolLM2-135M tokenizer, BPE) |
| Optimizer | CautiousAdamW, bf16, cosine LR |
| Best loss | 1.7888 @ step 66253 (115K-cycle hot state: stopped at step 68.8K) |
This is a raw pretrained base model — no instruction tuning, no chat template. Suitable for continued pretraining, SFT, or DPO. Weight tying: off (untied embeddings).
- Downloads last month
- 341
Model tree for kenpeter123/small-1b-pretrain
Base model
HuggingFaceTB/SmolLM2-135M