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
This references EricLBuehler/mistral.rs#375, where it was discovered that models may have u32 or u64 as GGUF metadata values. A fix for this is to manually check and then convert the types. However, I thought it may be better to, in the GGUF Value::to_*() code, detect when a subtyping relationship can be used. For example, we can automatically upcast a u32 to a u64.
This should be relatively easy to implement. However, my only concern is that this sort of hidden behavior may be confusing, and we actually want to detect an explicit mismatch?
The text was updated successfully, but these errors were encountered:
I think it's fine to have the different Value::to_*() be flexible, e.g. to_u64 be ok with u32, to_i64 be ok with i32 and uu32 etc as long as the conversion cannot lose data. If we start feeling that it could be an issue, we could introduce some to_u64_strict or whatever variant but I doubt that this will be required. Feel free to make a PR for this (ideally with a change as minimal as possible so that it will be easy to review).
This references EricLBuehler/mistral.rs#375, where it was discovered that models may have u32 or u64 as GGUF metadata values. A fix for this is to manually check and then convert the types. However, I thought it may be better to, in the GGUF
Value::to_*()
code, detect when a subtyping relationship can be used. For example, we can automatically upcast au32
to au64
.This should be relatively easy to implement. However, my only concern is that this sort of hidden behavior may be confusing, and we actually want to detect an explicit mismatch?
The text was updated successfully, but these errors were encountered: