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
Instead of serializing CandleTensor, we should just convert the underlying ParamSerde and DataSerialize structures to NestedValue directly. The data (vector) pointer will be copied to NestedValue::F32s or NestedValue::F16s (a new datatype that preserves encoding). You will need to modify the serialize_data function at https://github.com/tracel-ai/burn/blob/main/crates/burn-import/src/pytorch/reader.rs#L127-L145.
Follow-up to PR #1751.
Reposting the comment as a new issue.
Instead of serializing CandleTensor, we should just convert the underlying ParamSerde and DataSerialize structures to NestedValue directly. The data (vector) pointer will be copied to NestedValue::F32s or NestedValue::F16s (a new datatype that preserves encoding). You will need to modify the serialize_data function at https://github.com/tracel-ai/burn/blob/main/crates/burn-import/src/pytorch/reader.rs#L127-L145.
You will need to do something similar to the serialize function in https://github.com/tracel-ai/burn/blob/main/crates/burn-import/src/pytorch/adapter.rs#L68-L78. The logic overlaps with converting ParamSerde::new(param_id, DataSerialize::new(data, shape)) to NestedValue.
The text was updated successfully, but these errors were encountered: