Skip to content

Commit 2174a67

Browse files
committed
Fix docs shape
1 parent 2abb1fd commit 2174a67

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

candle-nn/src/cpu_flash_attention.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn vec_dot<T: WithDType + Sum + Copy + std::ops::Mul<Output = T>>(a: &[T], b: &[
7171
///
7272
/// - This supports ALiBi with `max_bias` as well as softcapping with `softcap`.
7373
///
74-
/// **Output shape:** (bs, seq, qhead, v_hidden)
74+
/// **Output shape:** (bs, qhead, seq, v_hidden)
7575
pub fn run_flash_attn_cpu<T>(
7676
q: &Tensor,
7777
k: &Tensor,

candle-nn/tests/cpu_flash_attn.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ fn cpu_flash_attn() -> Result<()> {
3030
softmax_scale,
3131
None,
3232
None,
33-
)?
34-
.transpose(1, 2)?;
33+
)?;
3534

3635
let out_arr: Vec<f32> = out.flatten_all()?.to_vec1()?;
3736
let ground_truth_arr: Vec<f32> = ground_truth.flatten_all()?.to_vec1()?;

0 commit comments

Comments
 (0)