Text Generation
Transformers
PyTorch
Safetensors
English
gpt2
causal-lm
ryze
text-generation-inference
Instructions to use Norman89107/ryze-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Norman89107/ryze-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Norman89107/ryze-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Norman89107/ryze-125m") model = AutoModelForCausalLM.from_pretrained("Norman89107/ryze-125m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Norman89107/ryze-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Norman89107/ryze-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Norman89107/ryze-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Norman89107/ryze-125m
- SGLang
How to use Norman89107/ryze-125m 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 "Norman89107/ryze-125m" \ --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": "Norman89107/ryze-125m", "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 "Norman89107/ryze-125m" \ --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": "Norman89107/ryze-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Norman89107/ryze-125m with Docker Model Runner:
docker model run hf.co/Norman89107/ryze-125m
Ryze-125M
A 125M parameter GPT-2 style language model trained from scratch.
Model Details
| Property | Value |
|---|---|
| Architecture | GPT-2 (decoder-only transformer) |
| Parameters | ~125M |
| Layers | 12 |
| Attention Heads | 12 |
| Hidden Dimension | 768 |
| Context Length | 512 tokens |
| Vocabulary Size | 50,000 |
| Training Steps | 23,000 |
| Tokens Seen | 376,832,000 (~377M) |
| Best Val Loss | 4.3596 |
Training Data
- Primary: HuggingFaceFW/fineweb (sample-10BT)
- Validation: HuggingFaceFW/dclm_100BT
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Norman89107/ryze-125m")
tokenizer = AutoTokenizer.from_pretrained("Norman89107/ryze-125m")
input_text = "The future of artificial intelligence"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100, do_sample=True, temperature=0.8)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training Configuration
- Micro Batch Size: 8
- Gradient Accumulation Steps: 4
- Effective Batch Size: 32 sequences (16,384 tokens)
- Learning Rate: 0.0003 (with ReduceLROnPlateau scheduler)
- Weight Decay: 0.1
- Max Gradient Norm: 1.0
- Dropout: 0.1
- Bias: Disabled
Custom Tokenizer
This model uses a custom BPE tokenizer trained on 100,000 documents with a vocabulary of 50,000 tokens.
- Downloads last month
- 311