mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-12-06 04:57:17 +08:00
Disable KV caching explicitly for native CP teacher replay
Signed-off-by: Sepehr Sameni <ssameni@nvidia.com>
This commit is contained in:
@@ -866,6 +866,7 @@ class TransformersBypassAdapter(ModuleBypassAdapter):
|
||||
"input_ids": layout.shard(tokens, 1),
|
||||
"position_ids": layout.shard(positions, 1),
|
||||
"valid_mask": layout.shard(torch.ones_like(tokens, dtype=torch.bool), 1),
|
||||
"use_cache": False,
|
||||
}
|
||||
# Head-tail positions contain gaps that HF otherwise mistakes for
|
||||
# packed documents, allocating a dense mask before native CP discards it.
|
||||
|
||||
Reference in New Issue
Block a user