Run this model with HF Jobs
Run marmossburg/gpt2-124m-chat on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/marmossburg/gpt2-124m-chat. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/marmossburg/gpt2-124m-chat on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/marmossburg/gpt2-124m-chat. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/marmossburg/gpt2-124m-chat. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use marmossburg/gpt2-124m-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marmossburg/gpt2-124m-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marmossburg/gpt2-124m-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("marmossburg/gpt2-124m-chat") model = AutoModelForCausalLM.from_pretrained("marmossburg/gpt2-124m-chat", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marmossburg/gpt2-124m-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marmossburg/gpt2-124m-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marmossburg/gpt2-124m-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marmossburg/gpt2-124m-chat
- SGLang
How to use marmossburg/gpt2-124m-chat 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 "marmossburg/gpt2-124m-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marmossburg/gpt2-124m-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "marmossburg/gpt2-124m-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marmossburg/gpt2-124m-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use marmossburg/gpt2-124m-chat with Docker Model Runner:
docker model run hf.co/marmossburg/gpt2-124m-chat
GPT-2 124M β Concise chat
Fine-tuned from marmossburg/gpt2-124m-reproduction, a model pretrained from scratch on FineWeb-Edu. All weights were updated; this is not a LoRA adapter.
The latest full-weight chat fine-tune, initialized directly from the pretrained base at step 19,072. It does not continue the earlier Smol-SmolTalk fine-tune.
Training used 4,152 conversations, including 3,173 multi-turn conversations, for two epochs and 1,038 optimizer updates. The mixture contains 4,060 original Smol-SmolTalk records, 88 project-authored records, and four adapted records. The aim is concise technical explanations, science discussion, follow-up questions, and friendly small talk. This describes the training intent, not demonstrated reliability.
| Setting | Value |
|---|---|
| GPU | One RTX PRO 4000 Blackwell, 24 GB |
| Precision | BF16 |
| Effective batch | 8 conversations |
| Context | 1,024 GPT-2 tokens |
| Optimizer | Fused AdamW, betas 0.9/0.999, epsilon 1e-8 |
| Learning rate | Constant 2e-5, no warmup |
| Weight decay / gradient clipping | 0.01 / 1.0 |
| Epochs / seed | 2 / 42 |
| Tokens processed, excluding padding | 2,800,758 |
| Supervision | Assistant answers and end tokens; user text and role headers masked |
| Software | PyTorch 2.9.1+cu130, Transformers 4.57.3, TRL 0.24.0 |
| Checkpoint | Held-out loss | Assistant-token accuracy |
|---|---|---|
| Base | 2.721162 | 45.41% |
| Final, 1,038 | 1.872742 | 57.62% |
Evaluation used 64 held-out conversations. These scores cannot be compared directly with the earlier fine-tune's 50-example evaluation. Token accuracy uses reference history and does not measure factual accuracy or chat success. Source data received structural filtering; factual quality and paraphrase overlap were not comprehensively audited. Repetition, incorrect explanations, and weak context tracking remain possible. No formal ASD-STE100 compliance is claimed.
Only the final checkpoint is published here. The intermediate checkpoint is not included.
Run
Use the tokenizer's included chat template. Tested training stack: Transformers 4.57.3 and PyTorch 2.9.1.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "marmossburg/gpt2-124m-chat"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo).eval()
messages = [{"role": "user", "content": "What is a Python dictionary?"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
with torch.inference_mode():
output = model.generate(
inputs, attention_mask=torch.ones_like(inputs), max_new_tokens=96,
do_sample=True, temperature=0.7, top_p=0.9, repetition_penalty=1.1,
suppress_tokens=list(range(len(tokenizer), model.config.vocab_size)),
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0, inputs.shape[1]:], skip_special_tokens=True))
Keep prompt plus generation within 1,024 tokens. For ongoing chat, append the actual assistant response to the history and trim oldest complete exchanges when needed.
Provenance
Smol-SmolTalk revision: f73fe857d519ff6ac5af2ea67c4d3834da7b8bcc.
Base checkpoint SHA256: 025c6a93d225ddbf76602b83db5310fa9579bc3a291c5918383749a4a2436994.
Model weights and tokenizer are at the repository root. Training metrics and settings are under training/; resumable optimizer state remains in the local training archive.
- Downloads last month
- 110
Model tree for marmossburg/gpt2-124m-chat
Base model
marmossburg/gpt2-124m-reproduction
