Skip to content

Sample Gemma dialog turns as the model card recommends - #262

Merged
iamwavecut merged 2 commits into
mainfrom
feat/gemma-card-sampling
Oct 14, 2026
Merged

iamwavecut merged 2 commits into
mainfrom
feat/gemma-card-sampling

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Summary

  • Route sampling for dialog. A route can set temperature, top_p, top_k, min_p, repeat_penalty and the two OpenAI penalties for its dialog turns. They come from the merged model and assignment config, the same way max_tokens and bad_words already do. Each value replaces the provider's configured value on its own; the rest keep their configured values. A value outside its valid range is ignored instead of failing the request. Before, the dialog path ignored the temperature and penalties of a route.
  • min_p on the chat request. New optional field; it is sent only when a route sets it, and the direct VRAM Cloud request does not carry it.
  • Migration 208. Sets the values from the model card on the dialog assignment of the GPU0 Gemma model, and nowhere else: temperature 0.6, top_p 0.9, top_k 64, min_p 0.05, repeat_penalty 1.1. The Qwen and GPT fallbacks, the history, optimizer and other Gemma workflows keep their own sampling. NInfer clamps top_k to 20 candidates and the serving proxy drops repeat_penalty, so the effective changes are temperature 0.2 → 0.6, top_p 0.95 → 0.9 and min_p 0 → 0.05. The frequency (0.3) and presence (0.2) penalties stay.

Migration notes

  • Forward: one UPDATE of one workflow_assignments row (workflow dialog, model Gemma 4 26B Heretic of provider aifarm-vllm-gpu0). It saves the previous value of each of the five keys under gemma_card_sampling_v1_previous and is idempotent. A database without that model is left unchanged.
  • Down: restores each key from the marker; a key that was absent is removed. Routing reloads at the next restart, so the deploy applies the change.
  • Dry run on temporary copies of the production tables (transaction rolled back): only the one row changes, a second run adds nothing, and the down migration returns it to the original value.

Checks

  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p openplotva-dialog -p openplotva-llm -p openplotva-storage -p openplotva-app
  • New tests: a route's sampling reaches the turn and invalid values are ignored; the wire request takes the turn sampling field by field; the migration contract.

A route can now set the sampling of its dialog turns: temperature, top_p,
top_k, min_p, repeat_penalty and the two OpenAI penalties come from the
merged model and assignment config, replace the provider's configured value
field by field, and are ignored when out of range. The chat request gains
min_p.

Migration 208 sets the card values (temperature 0.6, top_p 0.9, top_k 64,
min_p 0.05, repeat_penalty 1.1) on the dialog assignment of the GPU0 Gemma
model only. The fallbacks and the other Gemma workflows keep their own
sampling. NInfer clamps top_k to 20 candidates and the serving proxy drops
repeat_penalty. The down migration restores the previous keys exactly.
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Warnings
⚠️ Migration changes should explain forward/down compatibility, rollback/no-op behavior, or why rollback is impossible.
Messages
📖 Danger checked 8 changed file(s).

Generated by 🚫 dangerJS against af7ed5d

The advisories published today fail the dependency gate for 0.23.45
(ECH rejection data leak, unbounded Brotli certificate allocation,
ServerHello key-exchange downgrade, TLS secrets in Debug output). The lock
file moves to the patched release; no manifest change is needed.
@iamwavecut

Copy link
Copy Markdown
Owner Author

Danger migration warning: migration 208 only updates the inference_overrides JSON of one workflow_assignments row (workflow dialog, model Gemma 4 26B Heretic of provider aifarm-vllm-gpu0); it adds no column and no table. The previous release ignores the new keys, so rolling the code back without the down migration is safe. The down migration restores each of the five keys from the gemma_card_sampling_v1_previous marker and removes a key that was absent before. The up migration is idempotent, and a database without that model is left unchanged. I checked both directions on temporary copies of the production tables inside a rolled-back transaction: only that row changed, and the down migration returned it to its original value. Routing reloads at restart, so the deploy applies the change.

The second commit moves rustls in Cargo.lock from 0.23.45 to 0.23.46. Four advisories (RUSTSEC-2026-0346 to 0349) were published after the last green run and fail the dependency gate on every branch, so the deploy gate would refuse any commit until the lock file moves.

@iamwavecut
iamwavecut merged commit a27b383 into main Oct 14, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the feat/gemma-card-sampling branch October 14, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant