Skip to content

Commit

Permalink
16b
Browse files Browse the repository at this point in the history
  • Loading branch information
SkBlaz committed Dec 1, 2023
1 parent 8870793 commit 37df5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quantization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::io;
use std::slice;
//use half::bf16;

const BY_X: usize = 1;
const BY_X: usize = 2;


pub fn quantize_ffm_weights_3by(weights: &[f32]) -> Vec<[u8; BY_X]> {
Expand Down Expand Up @@ -55,6 +55,6 @@ mod tests {
fn test_quantize_2by() {
let some_random_float_weights = vec![0.51, 0.12, 0.11, 0.1232, 0.6123, 0.23];
let output_weights = quantize_ffm_weights_3by(&some_random_float_weights);
assert_eq!(output_weights[3], [72]);
assert_eq!(output_weights[3], [72, 80]);
}
}

0 comments on commit 37df5f7

Please sign in to comment.