You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9008d6d
Browse filesBrowse the repository at this point in the historyBrowse files
Make OnnxGenerator KV-cache init dtype-aware (f16/bf16)
OnnxGenerator allocated all past_key_values / recurrent-state buffers as
float32, so feeding them into an f16/bf16 ONNX export raised an ORT input
dtype mismatch — breaking the half-precision CUDA path advertised by the
Hy-MT2 example. Resolve each cache input's dtype from the session
(get_input_dtype, which maps bf16 via ml_dtypes) and allocate the zero
buffers accordingly, falling back to float32 when unknown.
Validated: examples/hy_mt2.py --dtype f16 now runs and matches HuggingFace
token-for-token; the f32 path is unchanged.
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
0 commit comments