- Add _ensure_cache_is_dynamic to convert tuple/list KV caches to DynamicCache before transformers v5's _get_cache rejects them - Wrap generate() via fix_prepare_inputs_for_generation for all model types - Fix Qwen3 RoPE: index cos/sin by position_ids (both branches were identical) - Fix Gemma2 softcapping attention: handle 4D masks and Q_len != K_len during prefill with past_key_values - Add _slice_position_ids shared utility, replace inline duplication in PeftModel_fast_forward, MistralForCausalLM_fast_forward, and CausalLM_fast_forward (covers Llama/Qwen3/Gemma2) - Remove redundant seq_len assignment in _fast_prepare_inputs_for_generation - Add unit tests (test_past_kv_utils.py) and GPU integration tests (test_past_kv_models.py) for Llama, Qwen3, and Gemma2 |
||
|---|---|---|
| .. | ||
| qlora | ||
| saving | ||
| utils | ||
| __init__.py | ||
| test_get_model_name.py | ||
| test_model_registry.py | ||
| test_past_kv_models.py | ||
| test_past_kv_utils.py | ||
| test_raw_text.py | ||