Speedmark Phi-4-mini
36% faster responses. Zero training. Zero data. Same model, less filler.
Speedmark is Microsoft's Phi-4-mini-instruct with RLHF verbosity surgically removed using jBlaze, a neural programming tool for direct weight editing.
What Changed
Modern instruction-tuned models are trained with RLHF to produce helpful, detailed responses. A side effect is padding: filler phrases, unnecessary elaboration, and restating what was already said. This wastes tokens and wall-clock time.
Speedmark identifies where verbosity lives in the model's weights and removes it directly -- no fine-tuning, no training data, no gradient descent. The result is a model that answers correctly but gets to the point faster.
Results
Tested on 8 questions spanning factual recall, reasoning, code generation, and explanation:
| Metric | Vanilla Phi-4-mini | Speedmark |
|---|---|---|
| Total tokens | 935 | 601 |
| Total time | 17.72s | 11.24s |
| Avg answer time | 2.21s | 1.41s |
| Token reduction | -- | 35.7% |
| Time reduction | -- | 36.5% |
| Generation rate | 52.8 tok/s | 53.5 tok/s |
The generation rate (tokens per second) is identical -- the speed gain comes entirely from producing fewer tokens, not faster decoding.
Side-by-Side Comparisons
Q: What causes rain? (200 tok, 3.72s -> 111 tok, 2.06s -- 45% faster)
Vanilla: Rain is caused by the water cycle, which involves several key processes:
- Evaporation: Water from oceans, rivers, lakes, and other bodies of water is heated by the sun and turns into water vapor... (continues for 200 tokens with numbered list, bolded headers, and elaborate sub-explanations)
Speedmark: Rain is caused by the accumulation of water droplets in the atmosphere. This process begins with the evaporation of water from Earth's surface, which rises and cools, forming clouds. When droplets grow heavy enough, they fall as rain.
Same correct answer. One takes 3.72 seconds. The other takes 2.06.
Q: Why is the sky blue? (171 tok, 3.24s -> 99 tok, 1.86s -- 43% faster)
Vanilla: The sky appears blue to the human eye because of the scattering of sunlight by the Earth's atmosphere. This phenomenon is known as Rayleigh scattering. Sunlight, which appears white, is actually made up of all the colors of the visible spectrum... (continues with wavelength details, violet paradox, and atmospheric composition)
Speedmark: The sky appears blue due to a phenomenon called Rayleigh scattering. This occurs when sunlight enters Earth's atmosphere and collides with molecules and small particles. Sunlight is composed of many colors, each with different wavelengths. Blue light has a shorter wavelength and is scattered more efficiently by atmospheric molecules.
Q: What is recursion in programming? (200 tok, 3.71s -> 29 tok, 0.54s -- 85% faster)
Vanilla: Recursion in programming is a method where a function calls itself directly or indirectly to solve a problem. It is a powerful technique that allows programmers to write cleaner, more elegant code for problems that can be broken down into smaller, similar sub-problems... (continues for 200 tokens with base cases, examples, stack overflow warnings, and comparisons to iteration)
Speedmark: Recursion in programming is a method where a function calls itself in order to solve a problem. It is a powerful technique used for tasks that can be divided into similar sub-problems.
Q: What is the capital of France? (68 tok, 1.26s -> 81 tok, 1.52s -- 21% longer)
Vanilla: The capital of France is Paris. Paris is not only the capital city but also the most populous city of France. It is known for its rich history, culture, and landmarks such as the Eiffel Tower, Notre-Dame...
Speedmark: The capital of France is Paris. Paris is not only the political and administrative center of France but also its largest city, known for its significant cultural, economic, and political influence...
Some questions produce slightly longer answers. This happens when the concision edit shifts phrasing without reducing content -- the model restructures rather than truncates.
Q: What is 2+2? (23 tok, 0.69s -> 36 tok, 0.67s)
Vanilla: 2+2 equals 4. This is a basic arithmetic operation and the answer is universally accepted as correct.
Speedmark: The answer to 2+2 is 4. This is a basic arithmetic operation where you add the two values together, resulting in 4.
Trivially short answers see minimal change -- there is no filler to remove.
Explanatory questions see the biggest improvement. Reasoning and code questions resist compression because the content is substance, not filler.
How It Works
Built with jBlaze, which extracts behavioral directions from transformer weights using contrastive activation analysis, then applies targeted edits to specific layers. No training loop, no dataset, no compute beyond a single forward pass for direction extraction.
Two layers edited. That is all.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ApolloRaines/Speedmark-Phi4-mini")
tokenizer = AutoTokenizer.from_pretrained("ApolloRaines/Speedmark-Phi4-mini")
messages = [{"role": "user", "content": "What causes rain?"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True, return_dict=True)
out = model.generate(**inputs, max_new_tokens=200, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Limitations
- Reasoning tasks (math word problems, multi-step logic) may produce slightly longer responses as the model compensates
- Code generation may truncate explanations before showing the full implementation
- Best suited for factual Q&A, knowledge retrieval, and explanatory tasks where RLHF padding is the bottleneck
Built With
jBlaze -- Neural programming for direct weight editing of transformer models.
License
Same as base model (MIT).
- Downloads last month
- 435
Model tree for ApolloRaines/Speedmark-Phi4-mini
Base model
microsoft/Phi-4-mini-instruct