Skip to content

typical_p is dead code and should be removed #345

@seayang-nv

Description

@seayang-nv

Priority Level

Medium

Task Summary

typical_p is dead code and should be removed. Here is the evidence:

  • Not a user-facing parameter. typical_p does not appear in any config model (GenerateParameters), CLI option, YAML preset, or DEFAULT_SAMPLING_PARAMETERS.
  • Never passed to prepare_params. The only call site that invokes prepare_params is in vllm_backend.py:513-526 — the sampling_kwargs dict it constructs contains temperature, repetition_penalty, top_p, top_k, min_p, logits_processors, max_tokens, etc., but not typical_p.
  • _get_api_param_mapping maps it, but nothing triggers it. The "typical_p" key in the mapping dict line 295 would only fire if typical_p appeared in the kwargs — it never does.
  • No other backend uses it. The timeseries backend and HuggingFace training backend do not reference typical_p.
  • The TypicalLogitsWarper import from transformers is only used by this dead path.

raised in this comment: PR #342

Technical Details & Implementation Plan

No response

Dependencies

No response

Metadata

Metadata

Assignees

Labels

taskDevelopment task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions