“GPT-2 Medium”
Collection
All models are “OpenAI GPT-2 Medium” at core fine-tuned, merged & trained by (WithIn Us AI) • 6 items • Updated • 1
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
language:
library_name: transformers pipeline_tag: text-generation
tags:
license: other license_name: withinusai-custom-license license_link: LICENSE
base_model: openai-community/gpt2-medium base_model_relation: finetune
datasets:
metrics:
GPT-2 Medium enhanced toward GPT-5.2-style reasoning + codex behavior.
Small footprint. Built to ship working code. ⚡🧠
This model begins as GPT-2 Medium and is fine-tuned by WithIn Us AI with the goal of pushing behavior toward a GPT-5.2 “twin target” style: stronger stepwise reasoning, more reliable code generation, and improved instruction-following.
openai-community/gpt2-mediumfrom transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "WithinUsAI/GPT2.5.2-high-reasoning-codex-0.4B"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
device_map="auto"
)
prompt = (
"You are a senior software engineer.\n"
"Task: Implement a robust JSONL reader in Python.\n"
"First list edge cases, then write the implementation with comments.\n\n"
"Answer:\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.95
)
print(tokenizer.decode(out[0], skip_special_tokens=True))