Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pegainfer-qwen35/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rand = { workspace = true }
safetensors = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync"] }

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions pegainfer-qwen35/src/batch_decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ impl Qwen35Model {
bufs: &mut BatchDecodeBuffers35,
) -> Result<()> {
let eps = self.config.rms_norm_eps;
let tp = self.tensor_parallel;
let num_attention_heads = self.config.local_num_attention_heads(tp);
let num_key_value_heads = self.config.local_num_key_value_heads(tp);
let geom = self.geometry;
let num_attention_heads = geom.local_num_attention_heads();
let num_key_value_heads = geom.local_num_key_value_heads();

ops::gemm_into(&self.ctx, &attn.q_proj, &bufs.normed, &mut bufs.q_full);
ops::gemm_into(&self.ctx, &attn.k_proj, &bufs.normed, &mut bufs.k_attn);
Expand Down
6 changes: 3 additions & 3 deletions pegainfer-qwen35/src/batch_decode_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use pegainfer_core::kv_pool::KvPool;
use pegainfer_core::tensor::DeviceContext;

use super::config::Config35;
use super::config::TensorParallelConfig;
use super::config::LocalGeometry;
use super::decode_buffers::BatchDecodeBuffers35;
use super::recurrent_state::LinearStatePointerTables;
use super::recurrent_state::RecurrentState;
Expand Down Expand Up @@ -61,7 +61,7 @@ impl BatchDecodeGraphState {
pub(crate) fn with_capacity(
ctx: &DeviceContext,
config: &Config35,
tensor_parallel: TensorParallelConfig,
geometry: LocalGeometry,
kv_pool: &KvPool,
max_batch: usize,
) -> Result<Self> {
Expand All @@ -71,7 +71,7 @@ impl BatchDecodeGraphState {
let buffers = BatchDecodeBuffers35::new(
ctx,
config,
tensor_parallel,
geometry,
max_batch,
max_total_pages,
padding_page_id,
Expand Down
Loading
Loading