Downloads · 30 days
0
tzervas/bwsk-gpt2-medium
bwsk-gpt2-medium is a text generation model from tzervas. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
GPT-2 Medium (345M params) trained in 6 variants (3 BWSK modes x 2 experiments) on WikiText-2 with full convergence training and early stopping.
Downloads · 30 days
0
Access
Public
Updated Mar 5, 2026
Repo size
8.5 GB
Likes
0
Public
Click a slice to open those files.
.safetensors8.5 GB · 100%
From the Hugging Face model README
GPT-2 Medium (345M params) trained in 6 variants (3 BWSK modes x 2 experiments) on WikiText-2 with full convergence training and early stopping.
This repo contains all model weights, configs, and training results in a single consolidated repository.
BWSK is a framework that classifies every neural network operation as S-type (information-preserving, reversible, coordination-free) or K-type (information-erasing, synchronization point) using combinator logic. This classification enables reversible backpropagation through S-phases to save memory, and CALM-based parallelism analysis.
| Property | Value |
|---|---|
| Base Model | openai-community/gpt2-medium |
| Architecture | Transformer (causal_lm) |
| Parameters | 345M |
| Dataset | WikiText-2 |
| Eval Metric | Perplexity |
| Type | Ratio |
|---|---|
| S-type (information-preserving) | 60.4% |
| K-type (information-erasing) | 39.6% |
| Mode | Final Loss | Val Perplexity | Test Perplexity | Peak Memory | Time | Epochs |
|---|---|---|---|---|---|---|
| Conventional | 2.1641 | 14.42 | 14.02 | 10.0 GB | 10.8m | 4 |
| BWSK Analyzed | 2.6678 | 14.40 | 13.97 | 10.0 GB | 10.7m | 4 |
| BWSK Reversible | 2.9908 | 14.44 | 14.02 | 7.9 GB | 12.5m | 4 |
Memory savings (reversible vs conventional): 20.3%
| Mode | Final Loss | Val Perplexity | Test Perplexity | Peak Memory | Time | Epochs |
|---|---|---|---|---|---|---|
| Conventional | 4.6614 | 300.96 | 307.62 | 10.0 GB | 16.0m | 5 |
| BWSK Analyzed | 4.1877 | 288.36 | 297.07 | 10.0 GB | 16.2m | 5 |
| BWSK Reversible | 4.6837 | 306.15 | 311.58 | 7.9 GB | 18.5m | 5 |
Memory savings (reversible vs conventional): 20.3%
├── README.md
├── results.json
├── finetune-conventional/
│ ├── model.safetensors
│ ├── config.json
│ └── training_results.json
├── finetune-bwsk-analyzed/
│ ├── model.safetensors
│ ├── config.json
│ └── training_results.json
├── finetune-bwsk-reversible/
│ ├── model.safetensors
│ ├── config.json
│ └── training_results.json
├── scratch-conventional/
│ ├── model.safetensors
│ ├── config.json
│ └── training_results.json
├── scratch-bwsk-analyzed/
│ ├── model.safetensors
│ ├── config.json
│ └── training_results.json
├── scratch-bwsk-reversible/
│ ├── model.safetensors
│ ├── config.json
│ └── training_results.json
Load a specific variant:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load fine-tuned conventional variant
model = AutoModelForCausalLM.from_pretrained(
"tzervas/bwsk-gpt2-medium", subfolder="finetune-conventional"
)
tokenizer = AutoTokenizer.from_pretrained(
"tzervas/bwsk-gpt2-medium", subfolder="finetune-conventional"
)
# Load from-scratch BWSK reversible variant
model = AutoModelForCausalLM.from_pretrained(
"tzervas/bwsk-gpt2-medium", subfolder="scratch-bwsk-reversible"
)
| Setting | Value |
|---|---|
| Optimizer | AdamW |
| LR (fine-tune) | 5e-05 |
| LR (from-scratch) | 3e-04 |
| LR Schedule | Cosine with warmup |
| Max Grad Norm | 1.0 |
| Mixed Precision | AMP (float16) |
| Early Stopping | Patience 3 |
| Batch Size | 2 |
| Sequence Length | 512 |
@software{zervas2026bwsk,
author = {Zervas, Tyler},
title = {BWSK: Combinator-Typed Neural Network Analysis},
year = {2026},
url = {https://github.com/tzervas/ai-s-combinator},
}
MIT