File size: 3,094 Bytes
77333b5
 
 
 
fb0bc2d
d7587be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fb0bc2d
d7587be
fb0bc2d
 
 
 
 
d7587be
77333b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# =========================
# ORIGINAL MODEL (Transformers) — README.md (FINAL)
# Repo: WithinUsAI/GPT2.5.2-high-reasoning-codex-0.4B
# =========================

---
language:
  - en

library_name: transformers
pipeline_tag: text-generation

tags:
  - gpt2
  - causal-lm
  - text-generation
  - code
  - coding
  - reasoning
  - instruct
  - lightweight
  - safetensors
  - withinusai

license: other
license_name: withinusai-custom-license
license_link: LICENSE

base_model: openai-community/gpt2-medium
base_model_relation: finetune

datasets:
  - WithinUsAI/GPT-2-to-GPT-5-5k
  - TeichAI/gpt-5.1-codex-max-1000x
  - TeichAI/gpt-5.1-high-reasoning-1000x

metrics:
  - pass@1
  - accuracy
  - exact_match

model-index:
  - name: WithinUsAI/GPT2.5.2-high-reasoning-codex-0.4B
    results: []
---

# WithinUsAI/GPT2.5.2-high-reasoning-codex-0.4B

<p align="center">
  <b>GPT-2 Medium enhanced toward GPT-5.2-style reasoning + codex behavior.</b><br/>
  Small footprint. Built to ship working code. ⚡🧠
</p>

## What “GPT2.5.2” means (project naming)
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.

- **GPT(2)** = GPT-2 Medium base  
- **GPT(5.2)** = target behavior style (reasoning + codex competence)  
- **GPT(2.5.2)** = WithIn Us AI enhanced release line/version marker  

## Model details
- **Model type:** Decoder-only causal language model (GPT-2 family)
- **Architecture:** gpt2
- **Size class:** ~0.4B parameters (approx.)
- **Base model:** `openai-community/gpt2-medium`
- **Base model relation:** fine-tune
- **Primary strengths:** coding assistance, refactors, debugging, structured reasoning

## Intended use
### Recommended ✅
- Code generation & completion (Python-first; multi-language ok)
- Debugging: error → root cause → patch
- Refactoring: preserve behavior, improve clarity/perf
- Stepwise technical reasoning with constraints and edge cases

### Not recommended 🚫
- High-stakes decisions (medical/legal/financial) without expert review
- Safety-critical systems without strict validation & monitoring

## Quickstart (Transformers)
```python
from 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))