add readme

This commit is contained in:
jhqxxx
2025-10-10 23:25:25 +08:00
parent 171b98cf25
commit f951a43a60
9 changed files with 111 additions and 16 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
use crate::{
models::{
base_modules::{AttentionNobias, MLPNoBias},
common::{AttentionNobias, MLPNoBias},
minicpm4::config::MiniCPM4Config,
},
position_embed::rope::compute_default_rope_parameters,
@@ -155,7 +155,7 @@ impl MiniCPMDecoderLayer {
+ xs.affine(
self.scale_depth as f64 / (self.num_hidden_layers as f64).sqrt(),
0.0,
))?;
)?)?;
Ok(xs)
}
@@ -180,7 +180,7 @@ impl MiniCPMDecoderLayer {
+ xs.affine(
self.scale_depth as f64 / (self.num_hidden_layers as f64).sqrt(),
0.0,
))?;
)?)?;
Ok(xs)
}
pub fn clear_kv_cache(&mut self) {
+1 -1
View File
@@ -1,4 +1,4 @@
pub mod base_modules;
pub mod common;
pub mod minicpm4;
pub mod qwen2_5vl;
pub mod voxcpm;
+3 -3
View File
@@ -1,7 +1,7 @@
use crate::{
models::{
base_modules::{AttentionNobias, MLPNoBias},
common::{AttentionNobias, MLPNoBias},
voxcpm::config::VoxMiniCPM4Config,
},
position_embed::rope::compute_default_rope_parameters,
@@ -193,7 +193,7 @@ impl MiniCPMDecoderLayer {
+ xs.affine(
self.scale_depth as f64 / (self.num_hidden_layers as f64).sqrt(),
0.0,
))?;
)?)?;
res_add
} else {
let res_add = (residual + xs)?;
@@ -206,7 +206,7 @@ impl MiniCPMDecoderLayer {
+ xs.affine(
self.scale_depth as f64 / (self.num_hidden_layers as f64).sqrt(),
0.0,
))?;
)?)?;
res_add
} else {
let res_add = (residual + xs)?;