ModelOption: design a comprehensive validation strategy

Aperta
#1,148 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

The issue asks for a single validation strategy for ModelOption sentinels such as STOP_SEQUENCES, TEMPERATURE and MAX_NEW_TOKENS, so the work is design before code. Read the discussion in #1112, where a per-option validate_stop_sequences helper was prototyped and removed, to see why. Done means an agreed approach for validating all options consistently, not a single fix.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/backends enhancement needs-design p2

Context

Mellea's ModelOption sentinels (e.g. STOP_SEQUENCES, TEMPERATURE, MAX_NEW_TOKENS) are passed through to backends with no type or value validation. Today, an invalid value typically surfaces as a confusing backend-specific error (or silently misbehaves) far from the user's call site.

This came up concretely in #1112: STOP_SEQUENCES requires list[str] for uniform behavior across backends — a bare str works on OpenAI/LiteLLM but breaks HuggingFace's stop_strings. A per-option validate_stop_sequences helper was prototyped there but pulled out, since validating one option in isolation creates inconsistency with the rest.

What we want

We need a single, consistent strategy for validating ModelOption values.

Lingua principale
Python
Stelle
1.8k
Fork
161
Merge medio
4g 3h
PR unite (30g)
45

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di generative-computing/mellea

Tutte le issue di generative-computing/mellea

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.