Text Generation
Transformers
Safetensors
English
Italian
gpt2
1gpu-llm
single-gpu
trained-from-scratch
gpt2preln
bilingual
english
italian
pretraining
base-model
causal-lm
llm-nanochat
medium
preln
decay-only
text-generation-inference
Instructions to use nazdef/1gpu-llm-medium-en-it-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nazdef/1gpu-llm-medium-en-it-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nazdef/1gpu-llm-medium-en-it-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nazdef/1gpu-llm-medium-en-it-base") model = AutoModelForCausalLM.from_pretrained("nazdef/1gpu-llm-medium-en-it-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nazdef/1gpu-llm-medium-en-it-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nazdef/1gpu-llm-medium-en-it-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nazdef/1gpu-llm-medium-en-it-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nazdef/1gpu-llm-medium-en-it-base
- SGLang
How to use nazdef/1gpu-llm-medium-en-it-base 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 "nazdef/1gpu-llm-medium-en-it-base" \ --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": "nazdef/1gpu-llm-medium-en-it-base", "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 "nazdef/1gpu-llm-medium-en-it-base" \ --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": "nazdef/1gpu-llm-medium-en-it-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nazdef/1gpu-llm-medium-en-it-base with Docker Model Runner:
docker model run hf.co/nazdef/1gpu-llm-medium-en-it-base
| { | |
| "checkpoints": { | |
| "manual-manual-step_14700-14700": { | |
| "books_en": { | |
| "loss": 4.411039806547619, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 21, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/books_en.jsonl", | |
| "perplexity": 82.35505232121704 | |
| }, | |
| "books_it": { | |
| "loss": 4.39037105015346, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 21, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/books_it.jsonl", | |
| "perplexity": 80.67034617221599 | |
| }, | |
| "code": { | |
| "loss": 7.720833333333333, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 30, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/code.jsonl", | |
| "perplexity": 2254.8378293808423 | |
| }, | |
| "web_en": { | |
| "loss": 5.489309210526316, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 19, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/web_en.jsonl", | |
| "perplexity": 242.0899159175953 | |
| }, | |
| "web_it": { | |
| "loss": 5.4087171052631575, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 19, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/web_it.jsonl", | |
| "perplexity": 223.34487584359522 | |
| }, | |
| "wiki_en": { | |
| "loss": 2.9984019886363638, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 22, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/wiki_en.jsonl", | |
| "perplexity": 20.05346563890292 | |
| }, | |
| "wiki_it": { | |
| "loss": 2.92021484375, | |
| "num_batches": 1, | |
| "num_sequences": 1, | |
| "num_tokens": 25, | |
| "path": "/home/descanso/.openclaw/workspace/python_project/llm-nanochat/eval/pretrain/sources/wiki_it.jsonl", | |
| "perplexity": 18.54527136741806 | |
| } | |
| } | |
| }, | |
| "recommended_checkpoint": { | |
| "checkpoint_name": "step_14700", | |
| "checkpoint_path": "/mnt/apps/llm-nanochat/checkpoints/20260629_resume-gpt2medium-gpt2preln-k20-wsddecayonly-rerunmissing-lr3p5294e5-anchor20k-final2e5-webwiki-step14200-to14850/step_14700.pt", | |
| "direction": "min", | |
| "value": 4.443570063664363 | |
| }, | |
| "source_losses": { | |
| "books_en": 4.411039806547619, | |
| "books_it": 4.39037105015346, | |
| "code": 7.720833333333333, | |
| "web_en": 5.489309210526316, | |
| "web_it": 5.4087171052631575, | |
| "wiki_en": 2.9984019886363638, | |
| "wiki_it": 2.92021484375 | |
| } | |
| } |