Files
aha/tests/config_tests.rs
T

47 lines
1.7 KiB
Rust
Raw Normal View History

2025-10-15 21:03:49 +08:00
use aha::models::{
2025-10-26 21:57:53 +08:00
minicpm4::config::MiniCPM4Config, qwen2_5vl::config::Qwen2_5VLConfig,
qwen3vl::config::Qwen3VLConfig, voxcpm::config::VoxCPMConfig,
2025-10-15 21:03:49 +08:00
};
2025-09-22 23:58:08 +08:00
use anyhow::Result;
2025-09-22 16:38:12 +08:00
#[test]
2025-09-25 12:09:25 +08:00
fn qwen2_5_vl_config() -> Result<()> {
// cargo test -F cuda,flash-attn qwen2_5vl_config -- --nocapture
2025-09-22 16:38:12 +08:00
let model_path = "/home/jhq/huggingface_model/Qwen/Qwen2.5-VL-3B-Instruct/";
let config_path = model_path.to_string() + "/config.json";
2025-09-25 12:09:25 +08:00
let config: Qwen2_5VLConfig = serde_json::from_slice(&std::fs::read(config_path)?)?;
2025-09-22 16:38:12 +08:00
println!("{:?}", config);
Ok(())
2025-09-22 23:58:08 +08:00
}
2025-09-25 12:09:25 +08:00
#[test]
fn minicpm4_config() -> Result<()> {
// cargo test -F cuda,flash-attn minicpm4_config -- --nocapture
let model_path = "/home/jhq/huggingface_model/OpenBMB/MiniCPM4-0.5B/";
let config_path = model_path.to_string() + "/config.json";
let config: MiniCPM4Config = serde_json::from_slice(&std::fs::read(config_path)?)?;
println!("{:?}", config);
Ok(())
2025-10-03 22:25:58 +08:00
}
#[test]
fn voxcpm_config() -> Result<()> {
// cargo test -F cuda,flash-attn minicpm4_config -- --nocapture
2025-10-15 23:34:23 +08:00
// cargo test -F cuda minicpm4_config -- --nocapture
2025-10-03 22:25:58 +08:00
let model_path = "/home/jhq/huggingface_model/openbmb/VoxCPM-0.5B/";
let config_path = model_path.to_string() + "/config.json";
let config: VoxCPMConfig = serde_json::from_slice(&std::fs::read(config_path)?)?;
println!("{:?}", config);
Ok(())
2025-10-15 21:03:49 +08:00
}
2025-10-26 21:39:23 +08:00
#[test]
fn qwen3vl_config() -> Result<()> {
// cargo test -F cuda qwen3vl_config -- --nocapture
let model_path = "/home/jhq/huggingface_model/Qwen/Qwen3-VL-4B-Instruct/";
let config_path = model_path.to_string() + "/config.json";
let config: Qwen3VLConfig = serde_json::from_slice(&std::fs::read(config_path)?)?;
println!("{:?}", config);
Ok(())
}