GPT-2 Small — instruction-tuned (SFT) toy assistant

Instruction-tuned version of submarat/gpt2-small-fineweb-edu-10b (a 124M GPT-2 reproduced from scratch on 10B FineWeb-Edu tokens), fine-tuned on Alpaca-cleaned with TRL's SFTTrainer (completion-only loss).

It's a toy: at 124M it follows simple instructions and holds the format, but it's shallow and hallucinates confidently. That's the point — it's a hands-on pretrain → SFT pipeline, not a usable product.

Prompt format (Alpaca-style)

### Instruction:
{instruction}

### Response:

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

m = AutoModelForCausalLM.from_pretrained("submarat/gpt2-small-fineweb-edu-10b-sft")
tok = AutoTokenizer.from_pretrained("submarat/gpt2-small-fineweb-edu-10b-sft")

prompt = "### Instruction:\nList three tips for staying focused while studying.\n\n### Response:\n"
ids = tok(prompt, return_tensors="pt").input_ids
out = m.generate(ids, max_new_tokens=80, do_sample=True, top_k=40, temperature=0.7,
                 repetition_penalty=1.3, pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))

Training

  • Base: submarat/gpt2-small-fineweb-edu-10b (124M, exact-GELU)
  • Data: Alpaca-cleaned (~52k), formatted as prompt/completion; loss on the response only
  • 3 epochs, batch 64, LR 2e-5 cosine, bf16, ctx 512

Trained alongside a DPO variant, submarat/gpt2-small-fineweb-edu-10b-dpo.

Downloads last month
44
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for submarat/gpt2-small-fineweb-edu-10b-sft

Quantized
(2)
this model
Quantizations
1 model

Dataset used to train submarat/gpt2-small-fineweb-edu-10b-sft

Space using submarat/gpt2-small-fineweb-edu-10b-sft 1