Text Generation
Transformers
ONNX
Safetensors
English
scribelm
feature-extraction
hemanth-hm
causal-lm
style-transfer
writing-assistant
wasm
conversational
custom_code
Instructions to use gnumanth/scribelm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gnumanth/scribelm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gnumanth/scribelm", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gnumanth/scribelm", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gnumanth/scribelm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gnumanth/scribelm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gnumanth/scribelm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gnumanth/scribelm
- SGLang
How to use gnumanth/scribelm with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "gnumanth/scribelm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gnumanth/scribelm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "gnumanth/scribelm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gnumanth/scribelm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gnumanth/scribelm with Docker Model Runner:
docker model run hf.co/gnumanth/scribelm
|
Download README.md from gnumanth/scribelm: direct link, hf CLI and curl.
- Browser
- Download file 5.03 kB
-
https://huggingface.co/gnumanth/scribelm/resolve/main/README.md
- Command line
-
hf download hf://gnumanth/scribelm/README.md
-
curl -L -o README.md https://huggingface.co/gnumanth/scribelm/resolve/main/README.md
5.03 kB
| 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"]) | |
| ``` | |