haykgrigorian/english-historical-corpus-1800-1875-15GB-sample
Updated • 198 • 1
How to use haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M", dtype="auto")How to use haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M
How to use haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M" \
--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": "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M",
"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 "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M" \
--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": "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M with Docker Model Runner:
docker model run hf.co/haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3mini-eval1-500M
v3 mini-eval model, trained from scratch on a ~20GB (5B-token) sample of 1800–1875 English texts using a Llama-based Causal Language Model.
| Detail | Value |
|---|---|
| Model Architecture | LlamaForCausalLM (Decoder-Only Transformer) |
| Parameter Count | ~500M |
| Training Type | Trained from Scratch (Random Initialization) |
| Tokenizer | Custom BPE, Vocab Size 32,000 |
| Sequence Length | 4096 tokens |
| Attention Type | Grouped Query Attention (GQA) |
This model is a custom size and configuration based on Llama:
| Parameter | Value |
|---|---|
| Number of Layers | 24 |
| Hidden Size (d) | 1280 |
| Intermediate Size ($\text{d}_{\text{ff}}$) | 3456 |
| Attention Heads | 20 (Query) / 5 (Key/Value) |
| Activation Function | SiLU (silu) |
| Normalization | RMS Norm (rms_norm_eps: 1e-06) |
| Position Embeddings | Rotary Positional Embeddings (RoPE, theta: 10000) |
sample_5b_tokens)ap-\npear) and character-confusion errors (deatli, lie for "he").Model weights and tokenizer are in the final/ subfolder.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
REPO = "haykgrigorian/TimeCapsuleLLM-English-1800-1875-v3-mini-eval"
tok = AutoTokenizer.from_pretrained(REPO, subfolder="final")
model = AutoModelForCausalLM.from_pretrained(REPO, subfolder="final", dtype=torch.bfloat16).eval()
This model was trained on an H100 SXM from RunPod
Total: $85