Skip to content

Commit b677a15

Browse files
fix: apply rustfmt to adam.rs and quant.rs
1 parent 10002a6 commit b677a15

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

crates/axonml-cli/src/commands/quant.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,7 @@ fn execute_info(args: QuantInfoArgs) -> CliResult<()> {
304304
for qt in quant_types {
305305
let est_size = estimate_quantized_size(num_params, qt);
306306
let ratio = file_size as f64 / est_size as f64;
307-
println!(
308-
" {}: {} ({:.1}x)",
309-
qt,
310-
format_size(est_size),
311-
ratio
312-
);
307+
println!(" {}: {} ({:.1}x)", qt, format_size(est_size), ratio);
313308
}
314309

315310
if args.detailed {

crates/axonml-optim/src/adam.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ impl Optimizer for Adam {
250250
let mut max_sq_vec = if self.amsgrad {
251251
state
252252
.max_exp_avg_sq
253-
.as_ref().map_or_else(|| vec![0.0f32; param_vec.len()], |t| t.to_vec())
253+
.as_ref()
254+
.map_or_else(|| vec![0.0f32; param_vec.len()], |t| t.to_vec())
254255
} else {
255256
Vec::new()
256257
};

0 commit comments

Comments
 (0)