chore(代码变更): 1. 清理无用代码 2. 更新依赖库 3. 优化项目结构 4. 修复小型bug 5. 增加注释以提高可读性
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
[package]
|
||||
name = "convert"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
minicpm-convert = { path = "../../crates/minicpm-convert" }
|
||||
burn = { version = "0.21", features = ["std", "wgpu"] }
|
||||
anyhow = "1.0"
|
||||
@@ -1,14 +0,0 @@
|
||||
use minicpm_convert::export_model_q8;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let safetensors_path = Path::new("MiniCPM5-1B/model-00000-of-00001.safetensors");
|
||||
let config_path = Path::new("MiniCPM5-1B/config.json");
|
||||
let tokenizer_path = Path::new("MiniCPM5-1B/tokenizer.json");
|
||||
|
||||
// Q8 量化导出(INT8,文件约 1/4 大小)
|
||||
export_model_q8(safetensors_path, config_path, tokenizer_path, Path::new("model_q8"))?;
|
||||
|
||||
println!("模型转换完成!");
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user