add LFM2.5-VL-1.6B|LFM2-VL-1.6B

This commit is contained in:
jhqxxx
2026-03-30 00:44:41 +08:00
parent b881dfcd8d
commit ea78da7834
27 changed files with 847 additions and 176 deletions
+23
View File
@@ -287,3 +287,26 @@ fn lfm2_weight() -> Result<()> {
println!("model_list: {:?}", model_list);
Ok(())
}
#[test]
fn lfm2vl_weight() -> Result<()> {
// cargo test -F cuda --test weight_test lfm2vl_weight -r -- --nocapture
let save_dir =
aha::utils::get_default_save_dir().ok_or(anyhow::anyhow!("Failed to get save dir"))?;
// let model_path = format!("{}/LiquidAI/LFM2.5-VL-1.6B/", save_dir);
let model_path = format!("{}/LiquidAI/LFM2-VL-1.6B/", save_dir);
let model_list = find_type_files(&model_path, "safetensors")?;
let device = Device::Cpu;
for m in &model_list {
let weights = safetensors::load(m, &device)?;
for (key, tensor) in weights.iter() {
// if key.contains("lm_head") {
// println!("=== {} === {:?}", key, tensor.shape());
// }
println!("=== {} === {:?}", key, tensor.shape());
}
}
println!("model_list: {:?}", model_list);
Ok(())
}