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
preln
decay-only
text-generation-inference
Instructions to use nazdef/1gpu-llm-small-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-small-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-small-en-it-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nazdef/1gpu-llm-small-en-it-base") model = AutoModelForCausalLM.from_pretrained("nazdef/1gpu-llm-small-en-it-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nazdef/1gpu-llm-small-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-small-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-small-en-it-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nazdef/1gpu-llm-small-en-it-base
- SGLang
How to use nazdef/1gpu-llm-small-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-small-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-small-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-small-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-small-en-it-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nazdef/1gpu-llm-small-en-it-base with Docker Model Runner:
docker model run hf.co/nazdef/1gpu-llm-small-en-it-base
| # Decoding search report — `decoding_tuning_en_it_v1` | |
| ## Scope | |
| - checkpoint: `/mnt/apps/llm-nanochat/checkpoints/20260622_resume-gpt2small-gpt2preln-k20-wsds800-final2e5-webwiki-step8000-dense50/step_8600.pt` | |
| - tokenizer: `/mnt/apps/llm-nanochat/tokenizers/tokenizer_20260515_en50it50_webwiki_stratified_500M` | |
| - tuning prompts: `/tmp/llm-nanochat-dev-p0p1/eval_prompts/decoding_tuning.jsonl` | |
| - holdout prompts: `/tmp/llm-nanochat-dev-p0p1/eval_prompts/decoding_tuning_holdout.jsonl` | |
| - seeds: `[1337, 1338, 1339]` | |
| - holdout top-k: `3` | |
| This report intentionally separates **decoding tuning** from the checkpoint-selection benchmark. The tuning prompt suite is the only data used to choose the recommended preset; holdout results are shown only as a confirmation check. | |
| ## Tuning leaderboard | |
| | Rank | Preset | Score | Pass rate | Distinct-2 | Loop rate | Repeated 4-gram | Lang. consistency | Length closeness | Avg tokens | Decoding | | |
| |---|---|---|---|---|---|---|---|---|---|---| | |
| | 1 | balanced | 2.789 | 0.0833 | 0.9176 | 0 | 0.0952 | 0.9514 | 0.9487 | 48.5714 | temp=0.8 top_k=50 top_p=0.95 rep=1.1 ng=0 max_new=64 | | |
| | 2 | creative | 2.7751 | 0.0833 | 0.9565 | 0.0476 | 0.0952 | 0.9792 | 0.9286 | 54.8571 | temp=1 top_k=100 top_p=0.95 rep=1.1 ng=0 max_new=64 | | |
| | 3 | anti_loop | 2.7175 | 0 | 0.9261 | 0 | 0.0476 | 0.9583 | 0.9654 | 49.4286 | temp=0.8 top_k=50 top_p=0.9 rep=1.15 ng=4 max_new=64 | | |
| | 4 | conservative | 1.3666 | 0.25 | 0.6885 | 0.2857 | 0.6667 | 0.9353 | 0.9635 | 49.3333 | temp=0.6 top_k=40 top_p=0.9 rep=1.05 ng=0 max_new=64 | | |
| | 5 | greedy | -0.9418 | 0 | 0.055 | 0.7143 | 0.7143 | 0.7708 | 0.971 | 49.7143 | temp=0 top_k=0 top_p=1 rep=1 ng=0 max_new=64 | | |
| ## Holdout confirmation | |
| Holdout prompts are only used after tuning has already chosen candidates. They are not part of the tuning leaderboard. | |
| | Rank | Preset | Score | Pass rate | Distinct-2 | Loop rate | Repeated 4-gram | Lang. consistency | Length closeness | Avg tokens | | |
| |---|---|---|---|---|---|---|---|---|---| | |
| | 1 | anti_loop | 3.3392 | 0.3333 | 0.9385 | 0 | 0.0833 | 1 | 0.8428 | 59.25 | | |
| | 2 | balanced | 3.1885 | 0.3333 | 0.9244 | 0 | 0.1667 | 0.9762 | 0.8607 | 58.3333 | | |
| | 3 | creative | 3.096 | 0.1111 | 0.9579 | 0 | 0 | 1 | 0.9486 | 53.8333 | | |
| ## Recommendation | |
| - recommended preset: `balanced` | |
| - tuning score: `2.789` | |
| - holdout checked: `True` | |
| - holdout results should be used as confirmation, not as the tuning objective. | |
| ## Notes | |
| - Large grids should be entered only after a coarse pass has identified a sensible band. | |
| - This workflow is intended for checkpoint-specific decoding tuning, not for declaring the best checkpoint itself. | |