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", device_map="auto") - 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
card: prefer balanced default for medium base release
Browse files- README.md +31 -11
- generation_config.json +2 -2
- recommended_decoding_params.json +11 -9
README.md
CHANGED
|
@@ -25,8 +25,6 @@ tags:
|
|
| 25 |
- decay-only
|
| 26 |
---
|
| 27 |
|
| 28 |
-

|
| 29 |
-
|
| 30 |
# 1gpu-llm Medium EN/IT Base
|
| 31 |
|
| 32 |
This repository is the current **ready-to-use base release** for the `1gpu-llm`
|
|
@@ -184,16 +182,31 @@ Short honest read:
|
|
| 184 |
|
| 185 |
The repo-native decoding sweep was run on this exact checkpoint.
|
| 186 |
|
| 187 |
-
|
| 188 |
|
| 189 |
- tuning winner: `creative`
|
| 190 |
- holdout winner: `creative`
|
| 191 |
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
|
| 194 |
- `do_sample = true`
|
| 195 |
-
- `temperature =
|
| 196 |
-
- `top_k =
|
| 197 |
- `top_p = 0.95`
|
| 198 |
- `repetition_penalty = 1.1`
|
| 199 |
- `no_repeat_ngram_size = 0`
|
|
@@ -201,14 +214,21 @@ Recommended generation params:
|
|
| 201 |
|
| 202 |
Holdout metrics for the recommended preset:
|
| 203 |
|
| 204 |
-
- `score = 2.
|
| 205 |
- `completion_rate = 1.0`
|
| 206 |
-
- `distinct_2 = 0.
|
| 207 |
-
- `language_consistency_mean = 0.
|
| 208 |
- `loop_rate = 0.0`
|
| 209 |
- `repeated_4gram_rate = 0.0`
|
| 210 |
-
- `language_switch_rate_mean = 0.
|
| 211 |
-
- `length_closeness = 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
|
| 213 |
Both `generation_config.json` and `recommended_decoding_params.json` are
|
| 214 |
included in the repo.
|
|
|
|
| 25 |
- decay-only
|
| 26 |
---
|
| 27 |
|
|
|
|
|
|
|
| 28 |
# 1gpu-llm Medium EN/IT Base
|
| 29 |
|
| 30 |
This repository is the current **ready-to-use base release** for the `1gpu-llm`
|
|
|
|
| 182 |
|
| 183 |
The repo-native decoding sweep was run on this exact checkpoint.
|
| 184 |
|
| 185 |
+
Raw sweep result:
|
| 186 |
|
| 187 |
- tuning winner: `creative`
|
| 188 |
- holdout winner: `creative`
|
| 189 |
|
| 190 |
+
Public default:
|
| 191 |
+
|
| 192 |
+
- keep `balanced` as the recommended preset for the published family-base card
|
| 193 |
+
- rationale:
|
| 194 |
+
- Naz explicitly prefers `balanced` as the default unless `creative` wins
|
| 195 |
+
clearly enough to justify the more aggressive preset
|
| 196 |
+
- on this checkpoint, `creative` does win the holdout score, but not by a
|
| 197 |
+
margin large enough to force a louder default for the public base release
|
| 198 |
+
- practical delta:
|
| 199 |
+
- `creative` holdout score = `2.6369`
|
| 200 |
+
- `balanced` holdout score = `2.4656`
|
| 201 |
+
- delta = `+0.1713`
|
| 202 |
+
- so the repo keeps the stronger exploratory preset documented, but ships the
|
| 203 |
+
calmer preset as the default recommendation
|
| 204 |
+
|
| 205 |
+
Recommended generation params (`balanced`):
|
| 206 |
|
| 207 |
- `do_sample = true`
|
| 208 |
+
- `temperature = 0.8`
|
| 209 |
+
- `top_k = 50`
|
| 210 |
- `top_p = 0.95`
|
| 211 |
- `repetition_penalty = 1.1`
|
| 212 |
- `no_repeat_ngram_size = 0`
|
|
|
|
| 214 |
|
| 215 |
Holdout metrics for the recommended preset:
|
| 216 |
|
| 217 |
+
- `score = 2.4656`
|
| 218 |
- `completion_rate = 1.0`
|
| 219 |
+
- `distinct_2 = 0.9878`
|
| 220 |
+
- `language_consistency_mean = 0.6667`
|
| 221 |
- `loop_rate = 0.0`
|
| 222 |
- `repeated_4gram_rate = 0.0`
|
| 223 |
+
- `language_switch_rate_mean = 0.2500`
|
| 224 |
+
- `length_closeness = 0.9355`
|
| 225 |
+
|
| 226 |
+
If you want the higher-scoring exploratory preset from the sweep instead:
|
| 227 |
+
|
| 228 |
+
- `creative`
|
| 229 |
+
- `temperature = 1.0`
|
| 230 |
+
- `top_k = 100`
|
| 231 |
+
- holdout score = `2.6369`
|
| 232 |
|
| 233 |
Both `generation_config.json` and `recommended_decoding_params.json` are
|
| 234 |
included in the repo.
|
generation_config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"do_sample": true,
|
| 3 |
-
"temperature":
|
| 4 |
-
"top_k":
|
| 5 |
"top_p": 0.95,
|
| 6 |
"repetition_penalty": 1.1,
|
| 7 |
"max_new_tokens": 64,
|
|
|
|
| 1 |
{
|
| 2 |
"do_sample": true,
|
| 3 |
+
"temperature": 0.8,
|
| 4 |
+
"top_k": 50,
|
| 5 |
"top_p": 0.95,
|
| 6 |
"repetition_penalty": 1.1,
|
| 7 |
"max_new_tokens": 64,
|
recommended_decoding_params.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
| 1 |
{
|
| 2 |
-
"preset_name": "
|
| 3 |
-
"selection_basis": "
|
| 4 |
"do_sample": true,
|
| 5 |
-
"temperature":
|
| 6 |
-
"top_k":
|
| 7 |
"top_p": 0.95,
|
| 8 |
"repetition_penalty": 1.1,
|
| 9 |
"no_repeat_ngram_size": 0,
|
| 10 |
"max_new_tokens": 64,
|
| 11 |
-
"holdout_score": 2.
|
| 12 |
-
"distinct_2": 0.
|
| 13 |
"loop_rate": 0.0,
|
| 14 |
"repeated_4gram_rate": 0.0,
|
| 15 |
-
"language_consistency_mean": 0.
|
| 16 |
-
"language_switch_rate_mean": 0.
|
| 17 |
-
"length_closeness": 0.
|
|
|
|
|
|
|
| 18 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"preset_name": "balanced",
|
| 3 |
+
"selection_basis": "public family-base default chosen conservatively; creative won the decoding-search holdout, but not by a large enough margin to override the balanced-default policy",
|
| 4 |
"do_sample": true,
|
| 5 |
+
"temperature": 0.8,
|
| 6 |
+
"top_k": 50,
|
| 7 |
"top_p": 0.95,
|
| 8 |
"repetition_penalty": 1.1,
|
| 9 |
"no_repeat_ngram_size": 0,
|
| 10 |
"max_new_tokens": 64,
|
| 11 |
+
"holdout_score": 2.4656392911585368,
|
| 12 |
+
"distinct_2": 0.9878048780487805,
|
| 13 |
"loop_rate": 0.0,
|
| 14 |
"repeated_4gram_rate": 0.0,
|
| 15 |
+
"language_consistency_mean": 0.6666666666666666,
|
| 16 |
+
"language_switch_rate_mean": 0.25,
|
| 17 |
+
"length_closeness": 0.935546875,
|
| 18 |
+
"creative_holdout_score": 2.636900140224359,
|
| 19 |
+
"creative_minus_balanced_score_delta": 0.17126084906582216
|
| 20 |
}
|