oscar-corpus/OSCAR-2301
Updated • 2.67k • 179
How to use efederici/ipt-125m with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="efederici/ipt-125m", trust_remote_code=True) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("efederici/ipt-125m", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("efederici/ipt-125m", trust_remote_code=True)How to use efederici/ipt-125m with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "efederici/ipt-125m"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "efederici/ipt-125m",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/efederici/ipt-125m
How to use efederici/ipt-125m with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "efederici/ipt-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": "efederici/ipt-125m",
"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 "efederici/ipt-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": "efederici/ipt-125m",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use efederici/ipt-125m with Docker Model Runner:
docker model run hf.co/efederici/ipt-125m
IPT-125m is a decoder-style transformer pretrained from scratch on 4.36 billion tokens of Italian text from the OSCAR-2301 dataset.
If you like this project, consider supporting me with a cup of coffee! 🤖✨🌞
This model is best used with the Hugging Face transformers library for training and finetuning.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("efederici/ipt-125m", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("efederici/ipt-125m")
The architecture is a modification of a standard decoder-only transformer.
| Hyperparameter | Value |
|---|---|
| n_parameters | 125M |
| n_layers | 12 |
| n_heads | 12 |
| d_model | 768 |
| vocab size | 50432 |
| sequence length | 2048 |