diff options
Diffstat (limited to 'candle-core/src/quantized/gguf_file.rs')
-rw-r--r-- | candle-core/src/quantized/gguf_file.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-core/src/quantized/gguf_file.rs b/candle-core/src/quantized/gguf_file.rs index cdd1a154..ccbd59eb 100644 --- a/candle-core/src/quantized/gguf_file.rs +++ b/candle-core/src/quantized/gguf_file.rs @@ -457,7 +457,7 @@ impl Content { Some(Value::I32(v)) if *v >= 0 => *v as u64, _ => DEFAULT_ALIGNMENT, }; - let tensor_data_offset = (position + alignment - 1) / alignment * alignment; + let tensor_data_offset = position.div_ceil(alignment) * alignment; Ok(Self { magic, metadata, |