add deepseek_ocr

This commit is contained in:
jhqxxx
2025-11-22 23:27:14 +08:00
parent c95b91ffc0
commit a14c35014a
20 changed files with 1715 additions and 151 deletions
+19
View File
@@ -61,3 +61,22 @@ fn qwen3vl_weight() -> Result<()> {
println!("model_list: {:?}", model_list);
Ok(())
}
#[test]
fn deepseekocr_weight() -> Result<()> {
let model_path = "/home/jhq/huggingface_model/deepseek-ai/DeepSeek-OCR/";
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(())
}