Instructions to use nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay") model = AutoModelForCausalLM.from_pretrained("nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay
- SGLang
How to use nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay 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/20260703_continual-pretraining-gpt2medium-step34000-nodecay" \ --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/20260703_continual-pretraining-gpt2medium-step34000-nodecay", "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/20260703_continual-pretraining-gpt2medium-step34000-nodecay" \ --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/20260703_continual-pretraining-gpt2medium-step34000-nodecay", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay with Docker Model Runner:
docker model run hf.co/nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay
GPT2Medium EN/IT NanoChat — continual-pretraining checkpoint step_34000
This is an ordinary checkpoint release from the main medium continual-pretraining run. It is not a separately launched decay-only branch. It is published as a reference candidate for the future 1gpu-llm-medium-v2 release; it is not yet that definitive release.
Released checkpoint
- checkpoint:
step_34000.pt - training run:
20260703_continual-pretraining-gpt2medium-gpt2preln-k20-step14700-lr5e5-w500-s18500-d2000-final1e5-webwiki - source family base:
step_14700 - training mode: continual pretraining, main CPT run (non-decay-only branch)
- languages: English + Italian
- context window:
2500tokens - architecture: GPT-2-style decoder with pre-layernorm blocks
- architecture identifiers:
architecture: gpt2,block_type: gpt2_prelayernorm - parameter count: approximately
337.7Mnative training parameters; approximately337.6Min the Transformers export - hardware: trained on a single RTX 4060 Ti 16GB
Why this checkpoint
step_34000 is currently the scalar champion of the evaluated medium checkpoint family:
val_loss_mixed = 4.4401step_2310022k decay branch:4.4675step_36000d2000 branch from 34k:4.4493
The checkpoint is therefore the current best base candidate for the medium v2 investigation, while the final 1gpu-llm-medium-v2 promotion remains intentionally open pending the remaining decoding/behavior comparison.
Training data
The model was trained on the bilingual EN/IT web + wiki corpus:
- English FineWeb-HQ (
epfml/FineWeb-HQ) - Italian FineWeb2-HQ (
epfml/FineWeb2-HQ) - English and Italian Wiki40B (
google/wiki40b) - local dataset:
202605141153_fineweb50_wiki50_50en_50it_score100_2500context_5Btokens_tok_20260515_en50it50_webwiki_stratified_500M
Quick start
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo_id = "nazdef/20260703_continual-pretraining-gpt2medium-step34000-nodecay"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id)
prompt = "La capitale d'Italia è"
prompt_ids = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
bos = torch.tensor([[tokenizer.bos_token_id]], dtype=prompt_ids["input_ids"].dtype)
input_ids = torch.cat([bos, prompt_ids["input_ids"]], dim=1)
attention_mask = torch.ones_like(input_ids)
outputs = model.generate(
input_ids=input_ids,
attention_mask=attention_mask,
do_sample=True,
max_new_tokens=64,
temperature=0.8,
top_k=50,
top_p=0.95,
repetition_penalty=1.1,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This is a base pretraining checkpoint, not an instruction-tuned chat model.
License
This release uses CC-BY-SA-4.0 as the practical downstream posture for the mixed training corpus. The corpus combines FineWeb-HQ/FineWeb2-HQ web data and Wiki40B slices, whose upstream terms and attribution/share-alike obligations may apply to downstream use and redistribution. Users are responsible for checking that their intended use and derivative packaging comply with the upstream dataset terms.
- Downloads last month
- 67