CoolFace
Modelpublic

GreenPT/Qwen3.8-27B-honey

sourceHugging Faceapache-2.0updated 27d agoView on Hugging Face
0likes24downloads
Model Card

Qwen3.8-27B-honey 🍯

A LoRA adapter that makes Qwen/Qwen3.8-27B answer in Honey-terse style natively: the same correct answer in substantially fewer output tokens, with no system prompt and no per-call overhead. Style source: Green-PT/honey-for-devs (MIT). Sibling model: GreenPT/Qwen3.5-9B-honey.

Headline (official three-arm bench): βˆ’37% total token bill vs base, at equal code correctness (10/10) and 92–96% meaning preservation.

What to expect, by task type

Aggregated across every evaluation run against this adapter (two independent harnesses, greedy and sampled decoding β€” raw data linked below):

Task typevs baseNotes
Explanations & QAβˆ’44% to βˆ’78%The big win: base derives at length, honey answers
Code, thinking mode onβˆ’51%Reasoning phase shortens dramatically; still 10/10 correct
Realistic code work (fix, refactor, extend)βˆ’5% to βˆ’12%Equal pass rates; no runaway generations
Bare snippet prompts, thinking off+6% to +35%Known regression, see below

The one regression: on bare "write function X" prompts with thinking off, this base already answers with only a code block, while the adapter writes ~12% tighter code but appends How it works / Examples sections β€” so those prompts run longer, not shorter (+6.2% on the official bench's code set; up to +35% on deliberately trivial one-liners). A training-data artifact of the style corpus's code examples. If you serve mostly snippet generation, use the base or add a system prompt suppressing explanations; for typical dev-assistant work the adapter is neutral to cheaper on code and much cheaper everywhere else.

Official bench: three ways to get a terse 27B

The GreenPT/honey-bench suite (25 explanation cases + 10 code tasks, thinking off and on) compares the adapter against injecting the full honey SKILL.md as a system prompt. Run 2026-08-28 (GLM-5.2-FP8 meaning juror) and re-run 2026-08-30 (Claude juror); greedy sections reproduced token-for-token, confirming the results.

armexplanationscode, think offcode, think on**total bill**meaningcode tests
Base Qwen3.8-27Bβ€”β€”β€”β€”β€”10/10
+ honey SKILL.md prompt (~3,700 tok/call)βˆ’71.8%βˆ’52.9%+6.7%+719%25/2510/10
this LoRAβˆ’43.9%+6.2%βˆ’51.2%βˆ’37.1%24/2510/10

The skill-prompt arm is the terseness ceiling but re-sends its system prompt every call β€” 8Γ— the total bill. The LoRA gets most of the output saving with zero input overhead.

Note on +719%: that is a raw token count, not a dollar figure. Input tokens are typically priced 4–10Γ— cheaper than output tokens, and a static system prompt is exactly what prompt caching discounts most β€” so the skill-prompt arm's real cost premium is much smaller than 8Γ— on providers with caching. It still never beats the LoRA, which pays no per-call overhead at all and skips the ~3,700-token prefill latency.

The LoRA's single meaning miss was an arithmetic slip under sampling (60 × 2.5 computed as 375); both arms pass the classic traps (100°C→212°F, bat-and-ball→$0.05).

What terse looks like

"What is the time complexity of binary search on a sorted array of n elements?" β€” greedy, both correct:

  • β€”base (454 tokens): a ### Logical Deduction walkthrough of the algorithm's mechanism, the halving recurrence, and its solution.
  • β€”honey (28 tokens): O(log n) β€” each comparison halves the search space, so at most ⌈logβ‚‚ nβŒ‰ comparisons.

Usage

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

ADAPTER = "GreenPT/Qwen3.8-27B-honey"

tok = AutoTokenizer.from_pretrained(ADAPTER)
model = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen3.8-27B", torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(model, ADAPTER)
# for serving, merge to remove the adapter's per-token overhead:
# model = model.merge_and_unload()

messages = [{"role": "user", "content": "Explain what a race condition is."}]
inputs = tok.apply_chat_template(
    messages, add_generation_prompt=True, enable_thinking=False,
    return_tensors="pt", return_dict=True,
).to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

The base repo's generation_config.json already stops on both <|im_end|> (248046) and <|endoftext|> (248044), and this adapter ends every turn cleanly on <|im_end|> β€” no extra stop-token configuration is needed. If your serving stack takes EOS from config.json instead, set eos_token_id=[248046, 248044] explicitly.

Training

  • β€”LoRA r=16, Ξ±=32, on all attention, linear-attention, and MLP projections (12 module types, 992 tensors, 467MB).
  • β€”3 epochs on the same ~3.9M-token Honey-style dataset as the 9B sibling.
  • β€”Final eval: loss 0.726, mean token accuracy 0.804.

adapter_model.safetensors uses the text-only module tree (model.layers…) so the standard AutoModelForCausalLM + PEFT snippet above works as-is. (The trainer originally saved model.language_model.layers… keys from Qwen3_5ForConditionalGeneration; loading a checkpoint with mismatched keys makes PEFT silently drop every tensor β€” if you swap loading class or checkpoint, verify the adapter changes the logits.)

Evaluation data

  • β€”`evals/results.json` β€” 26-prompt greedy paired suite (QA / code / explanations, adapter toggled on one loaded model)
  • β€”`evals/code_recheck.json` β€” 16 bare snippet prompts Γ— greedy + 2 sampled seeds (the regression, quantified)
  • β€”`evals/code_realistic.json` β€” 10 realistic code tasks (bugfix / refactor / extend / implement), executed against tests
  • β€”`GreenPT/honey-bench` β€” official three-arm bench: results_27b_fullskill/, results_27b_fullskill_rerun/, reports

Limitations

  • β€”Style transfer only β€” factual ability is the base model's; terse phrasing can drop hedges and caveats the base would include, and one sampled run produced an arithmetic slip (see bench).
  • β€”Bare snippet-style code prompts run longer than base (see the regression note above).
  • β€”Eval suites are small (26–45 prompts per harness), text-only, single-turn.
  • β€”Not additionally safety-tuned beyond the base model.