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
| { | |
| "contains_mixed_model_types": false, | |
| "metric_recommendations": { | |
| "cloze_en_contains": { | |
| "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": "max", | |
| "value": 0.16 | |
| }, | |
| "cloze_en_exact": { | |
| "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": "max", | |
| "value": 0.0 | |
| }, | |
| "cloze_it_contains": { | |
| "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": "max", | |
| "value": 0.24 | |
| }, | |
| "cloze_it_exact": { | |
| "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": "max", | |
| "value": 0.0 | |
| }, | |
| "distinct_1": { | |
| "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": "max", | |
| "value": 0.27804410354745923 | |
| }, | |
| "distinct_2": { | |
| "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": "max", | |
| "value": 0.5643070787637089 | |
| }, | |
| "language_consistency_en": { | |
| "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": "max", | |
| "value": 1.0 | |
| }, | |
| "language_consistency_it": { | |
| "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": "max", | |
| "value": 0.85 | |
| }, | |
| "language_switch_rate_en": { | |
| "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": 0.0 | |
| }, | |
| "language_switch_rate_it": { | |
| "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": 0.0 | |
| }, | |
| "loop_rate": { | |
| "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": 0.375 | |
| }, | |
| "ppl_en": { | |
| "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": 80.87098332928396 | |
| }, | |
| "ppl_it": { | |
| "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": 35.982162207895115 | |
| }, | |
| "ppl_mixed": { | |
| "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": 85.07813449956652 | |
| }, | |
| "repeated_4gram_rate": { | |
| "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": 0.75 | |
| }, | |
| "source_loss_books_en": { | |
| "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.411039806547619 | |
| }, | |
| "source_loss_books_it": { | |
| "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.39037105015346 | |
| }, | |
| "source_loss_code": { | |
| "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": 7.720833333333333 | |
| }, | |
| "source_loss_web_en": { | |
| "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": 5.489309210526316 | |
| }, | |
| "source_loss_web_it": { | |
| "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": 5.4087171052631575 | |
| }, | |
| "source_loss_wiki_en": { | |
| "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": 2.9984019886363638 | |
| }, | |
| "source_loss_wiki_it": { | |
| "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": 2.92021484375 | |
| }, | |
| "val_loss_en": { | |
| "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.392855086416568 | |
| }, | |
| "val_loss_it": { | |
| "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": 3.5830233214331453 | |
| }, | |
| "val_loss_mixed": { | |
| "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 | |
| } | |
| }, | |
| "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 | |
| }, | |
| "recommended_metric": "val_loss_mixed", | |
| "rows": [ | |
| { | |
| "aggregate_dataset_count": 0, | |
| "aggregate_validation_loss_mean": null, | |
| "aggregate_validation_perplexity_mean": null, | |
| "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", | |
| "checkpoint_selector": "manual", | |
| "checkpoint_step": 14700, | |
| "cloze_en_contains": 0.16, | |
| "cloze_en_exact": 0.0, | |
| "cloze_it_contains": 0.24, | |
| "cloze_it_exact": 0.0, | |
| "delta_vs_previous_generation_pass_rate": null, | |
| "delta_vs_previous_validation_loss_mean": null, | |
| "distinct_1": 0.27804410354745923, | |
| "distinct_2": 0.5643070787637089, | |
| "generation_pass_rate": null, | |
| "generation_pass_rate_regression_vs_previous": false, | |
| "generation_passed_prompts": 0, | |
| "generation_scored_prompts": 0, | |
| "generation_total_prompts": 40, | |
| "language_consistency_en": 1.0, | |
| "language_consistency_it": 0.85, | |
| "language_switch_rate_en": 0.0, | |
| "language_switch_rate_it": 0.0, | |
| "loop_rate": 0.375, | |
| "model_type": "pretrained", | |
| "ppl_en": 80.87098332928396, | |
| "ppl_it": 35.982162207895115, | |
| "ppl_mixed": 85.07813449956652, | |
| "repeated_4gram_rate": 0.75, | |
| "run_dir": null, | |
| "run_name": null, | |
| "selected_by": "manual_path", | |
| "selection_metric_name": null, | |
| "selection_metric_value": null, | |
| "source_loss_books_en": 4.411039806547619, | |
| "source_loss_books_it": 4.39037105015346, | |
| "source_loss_code": 7.720833333333333, | |
| "source_loss_web_en": 5.489309210526316, | |
| "source_loss_web_it": 5.4087171052631575, | |
| "source_loss_wiki_en": 2.9984019886363638, | |
| "source_loss_wiki_it": 2.92021484375, | |
| "val_loss_en": 4.392855086416568, | |
| "val_loss_it": 3.5830233214331453, | |
| "val_loss_mixed": 4.443570063664363, | |
| "validation_loss_regression_vs_previous": false | |
| } | |
| ] | |
| } |