File size: 5,031 Bytes
c5fcd3f
 
3bf7870
 
c5fcd3f
 
 
3bf7870
 
c5fcd3f
3bf7870
c5fcd3f
3bf7870
c5fcd3f
 
3bf7870
 
c5fcd3f
 
3bf7870
c5fcd3f
3bf7870
c5fcd3f
3bf7870
c5fcd3f
3bf7870
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
language:
  - en
library_name: transformers
tags:
  - scribelm
  - hemanth-hm
  - causal-lm
  - style-transfer
  - writing-assistant
  - onnx
  - wasm
datasets:
  - gnumanth/scribelm-dataset
base_model: HuggingFaceTB/SmolLM2-135M-Instruct
pipeline_tag: text-generation
---

# `gnumanth/scribelm` — 134.8M Multi-Head Authoring & Voice Critic Model (Hemanth HM Style)

`scribelm` (`ScribeLMForAuthoring`) is an intact **30-layer, 134.85M-parameter** causal transformer and 5-axis voice critic fine-tuned on **388 Markdown blog posts (`~230,000` tokens across 15+ years)** from [h3manth.com/scribe](https://h3manth.com/scribe).

## Architecture (`ScribeLMForAuthoring`)

- **Backbone**: Intact 30-layer `HuggingFaceTB/SmolLM2-135M-Instruct` (`d_model=576`, `n_heads=9`, `n_kv_heads=3`, `intermediate_size=1536`, `vocab_size=49,152`, eager attention for deterministic browser ONNX export, bottom 20 layers frozen to preserve fluent English & code syntax).
- **Four Joint Heads**:
  1. `lm_head`: Causal autoregressive language modeling head for writing blog posts, rewriting dense specs, and drafting social launch threads.
  2. `voice_head`: Calibrated `p_hemanth` authenticity classifier (`AUROC = 1.0`, `ECE = 0.037`).
  3. `style_head`: 5-axis style telemetry regressor predicting `(directness, hook_strength, zero_fluff, code_first, cadence)`.
  4. `task_head`: 4-way writing task router `(blog, rewrite, social, critic)` (`91.1%` accuracy).

## Three Runtime Tiers (`N = 146` Held-Out Test Split · `B = 1,000` Bootstrap 95% CIs)

| Runtime Tier | Artifact | Size | Composite | Voice Auth Acc | Task Acc | 5-Axis Fidelity | `p_hemanth` AUROC | `p50` Latency |
| :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| **Tier 1A (PyTorch FP32)** | `model.safetensors` | `514.45 MB` | **`91.7%`** | `96.58%` | `91.1%` | `85.79%` | `1.0` | `155.177 ms` |
| **Tier 1B (ONNX Int8 Browser/CPU)** | `onnx/model_quantized.onnx` | `157.84 MB` | **`89.57%`** | `92.47%` | `89.73%` | `85.54%` | `1.0` | `135.594 ms` |
| **Tier 2 (Zero-Dep JS/Py Engine)** | `scribelm` npm / PyPI | `0 MB` | **`99.64%`** | `100.0%` | `100.0%` | `98.79%` | `1.0` | `0.584 ms` |
| **Hybrid (`Fast + ONNX Int8`)** | Combined | `157.84 MB` | **`99.59%`** | `100.0%` | `100.0%` | `98.63%` | `1.0` | `0.666 ms` |

## Live Qualitative Generations (`134.8M` Neural Checkpoint)

### nullspan structured extraction launch (`rewrite`)
- **Input Draft**: `Baked nullspan a single-pass structured extraction with exact [start, end] character spans, calibrated p_null abstention, algebraic invariant checks (subtotal == nodes * hourly_rate), and p10/p50/p90 quantiles.`
- **Neural Generation (`134.8M`, `p_hemanth=1.0`)**:

```markdown
One-pass structured extraction with exact `start`, `end` character spans, calibrated `p_null` abstentions, algebraic `invariance` checks, and 95% quantile `p_hemanth=0.2` `p_hemanth=0.4` `p_hemanth=0.6` `p_hemanth=0.8` `p_hemanth=0.9` `p_hemanth=1.0`. Zero overhead for all
```

### Skills vs MCP for AI Agents (`rewrite`)
- **Input Draft**: `In contemporary artificial intelligence agent architectures, practitioners often debate whether modular Skill definitions supersede the Model Context Protocol (MCP).`
- **Neural Generation (`134.8M`, `p_hemanth=1.0`)**:

```markdown
Skills vs MCP? Wrong question.

Both are tools for building AI agents. But they solve different problems:
- Skills = what your agent knows how to do
- MCP = what your agent can access

One teaches you how to do it, while the other provides a way for your agent to access it.

But they solve different problems:
- Skills = what your agent knows how to do
- MCP = what your agent can access

One teaches you how to do it, while the
```

### Why Every Agent Needs an Escape Hatch (`blog`)
- **Input Draft**: `Deterministic guardrails vs probabilistic LLM loops, calibrated p_null abstention, and zero-dep local fallbacks.`
- **Neural Generation (`134.8M`, `p_hemanth=1.0`)**:

```markdown
# Why Every Agent Needs an Escape Hatch

Probabilistic LLM loops are great until they hallucinate at 3 AM. Short answer: **keep the fast path deterministic and wire a calibrated `p_null` escape hatch.**

- **Deterministic fast path:** handle 95% of structured payloads in `<$1M-$2M>` payloads by wireing `<$0.1M-$0.4M>`. Handle 75% of structured payloads in `<$1M-$
```



## Usage (Python + Transformers)

```python
import torch
from transformers import AutoConfig, AutoModel, AutoTokenizer

repo_id = "gnumanth/scribelm"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
config = AutoConfig.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, config=config, trust_remote_code=True)

res = model.generate_text(
    tokenizer,
    "Rewrite this into Hemanth HM style:\nIn contemporary AI agent architectures, practitioners debate whether modular Skill definitions supersede MCP.",
    max_new_tokens=96,
)
print(res["text"])
print(res["p_hemanth"], res["style_scores"])
```