Skip to content
Discussion options

You must be logged in to vote

Confirmed (from source), and a few pieces of external context — no upstream llama.cpp doc or benchmark directly answers "is this a known abliteration cost," so that part stays a hypothesis.

  1. How llama.cpp actually orders grammar vs. penalties (confirmed from source)

common_sampler_sample() in common/sampling.cpp does, by default (grammar_first=false, which is what the server uses for chat/tool-call routes):

  1. apply the reasoning-budget sampler,
  2. run the full sampler chain (DRY, penalties, top_k/top_p, temp, …) on the full vocab logits, pick a token,
  3. check the picked token against the grammar; only if it's invalid does it resample with grmr applied before the chain.

So the claim "sampler p…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@demirciberk
Comment options

Answer selected by syedabrar211065
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants