Instructions to use BRR1154/SmolLM2-135M-PromptCompiler-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BRR1154/SmolLM2-135M-PromptCompiler-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BRR1154/SmolLM2-135M-PromptCompiler-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BRR1154/SmolLM2-135M-PromptCompiler-v1") model = AutoModelForCausalLM.from_pretrained("BRR1154/SmolLM2-135M-PromptCompiler-v1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BRR1154/SmolLM2-135M-PromptCompiler-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BRR1154/SmolLM2-135M-PromptCompiler-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BRR1154/SmolLM2-135M-PromptCompiler-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BRR1154/SmolLM2-135M-PromptCompiler-v1
- SGLang
How to use BRR1154/SmolLM2-135M-PromptCompiler-v1 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 "BRR1154/SmolLM2-135M-PromptCompiler-v1" \ --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": "BRR1154/SmolLM2-135M-PromptCompiler-v1", "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 "BRR1154/SmolLM2-135M-PromptCompiler-v1" \ --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": "BRR1154/SmolLM2-135M-PromptCompiler-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BRR1154/SmolLM2-135M-PromptCompiler-v1 with Docker Model Runner:
docker model run hf.co/BRR1154/SmolLM2-135M-PromptCompiler-v1
SmolLM2-135M-PromptCompiler-v1: Symbolic Prompt Optimization Specialist
Lead Architect: Bhavanam Rajendra Reddy (Runtime-Slayers | ORCID: 0009-0005-3349-1162)
Organization: Runtime-Slayers
Parameter Footprint: 135 Million
Base Architecture: HuggingFaceTB/SmolLM2-135M
Weight Surgery Protocol: Gram-Schmidt Subspace Null-Space Model Editing (Zero-Forgetting $\Delta W \cdot V_{\text{base}} = 0$)
1. Overview & Specialization
Compiles long natural language system directives into compact token representations, optimizing context window utilization for edge swarm agents.
Part of the Runtime-Slayers Autonomous SLM Swarm Engine, operating in coordination with frontier orchestrators (NVIDIA Nemotron-3-Ultra 550B, DeepSeek V4.1, GLM-5.3, MiniMax M3.1, and Kimi K3.1 Pro) and the Google Research Harnessยฒ recursive optimization framework.
2. Quickstart Inference Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "BRR1154/SmolLM2-135M-PromptCompiler-v1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float32,
device_map="auto"
)
messages = [{"role": "user", "content": "Execute domain task."}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=256, temperature=0.2)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
๐ Empirical Academic Benchmarks & Evaluation Realities
1. Measured Academic Benchmarks (lm-eval v0.4.13 on CPU):
| Benchmark | Task Focus | Sample Size | Raw Accuracy | Normalized (acc_norm) |
Standard Error | Real-World Takeaway |
|---|---|---|---|---|---|---|
| ARC-Easy | Elementary grade science QA | 50 | 50.0% (25/50) | 44.0% | $\pm 7.14%$ | Moderate baseline matching base SmolLM2. |
| ARC-Challenge | Multi-hop complex scientific deduction | 50 | 26.0% (13/50) | 26.0% | $\pm 6.27%$ | Near random 4-choice guess baseline (25%). |
| HellaSwag | Situational continuation | 50 | 44.0% (22/50) | 44.0% | $\pm 7.09%$ | Typical for ultra-compact 135M architectures. |
| OpenBookQA | Multi-hop open-book facts | 50 | 16.0% (8/50) | 38.0% | $\pm 6.93%$ | Below random baseline on raw accuracy. |
| WinoGrande | Coreference ambiguity resolution | 50 | 52.0% (26/50) | 52.0% | $\pm 7.14%$ | Near 50% binary choice baseline. |
2. Official Foundation Baselines (SmolLM2-135M-Instruct Technical Report, 2024):
- MMLU (5-shot): 25.8% (barely above 25% random baseline)
- GSM8K (8-shot Math): 8.3% (arithmetic reasoning requires external tools)
- HumanEval (Pass@1, Python): 22.0%
3. Real Codebase Comprehension & Ambiguity Limitations:
- Repository Architecture Comprehension: 42.17 / 100 (Tested on real scientific codebases
new_planet_identificationandBio-Sync-AI). - Ambiguity & Clarification Stress Test: 0.0 / 8.0 (0%). When presented with ambiguous deployment requests without credentials, the 135M parameter capacity defaults to emitting code completions rather than recognizing missing information and asking for clarification.
- Architectural Role: This model functions as an ultra-compact, low-latency, deterministic syntax and token emitter (sub-50ms inference on edge CPU). High-level cognitive arbitration and multi-hop reasoning are delegated to larger models or closed-loop execution harnesses.
3. Citation
@misc{reddy2026smollm2_135m_promptcompiler_v1,
author = {Reddy, Bhavanam Rajendra},
title = {SmolLM2-135M-PromptCompiler-v1: Symbolic Prompt Optimization Specialist},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/BRR1154/SmolLM2-135M-PromptCompiler-v1}}
}
- Downloads last month
- -
Model tree for BRR1154/SmolLM2-135M-PromptCompiler-v1
Base model
HuggingFaceTB/SmolLM2-135M