mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-21 01:31:53 +02:00
model : support LiquidAI LFM2 hybrid family (llama/14620)
**Important** LFM2 was [merged ](https://github.com/huggingface/transformers/pull/39340)into transformers, but has not yet been released. To convert into gguf, install transformers from source ```shell pip install "transformers @ git+https://github.com/huggingface/transformers.git@main" ```
This commit is contained in:
committed by
Georgi Gerganov
parent
a4ff4ec9cb
commit
74f6d47904
@@ -107,8 +107,11 @@ static void ssm_conv_f32_cuda(const float * src0, const float * src1, const int
|
|||||||
if (nc == 4) {
|
if (nc == 4) {
|
||||||
ssm_conv_f32<threads, 4><<<blocks, threads, 0, stream>>>(src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1,
|
ssm_conv_f32<threads, 4><<<blocks, threads, 0, stream>>>(src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1,
|
||||||
dst, dst_nb0, dst_nb1, dst_nb2, n_t);
|
dst, dst_nb0, dst_nb1, dst_nb2, n_t);
|
||||||
|
} else if (nc == 3) {
|
||||||
|
ssm_conv_f32<threads, 3><<<blocks, threads, 0, stream>>>(src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1,
|
||||||
|
dst, dst_nb0, dst_nb1, dst_nb2, n_t);
|
||||||
} else {
|
} else {
|
||||||
GGML_ABORT("Only support kernel size = 4 now.");
|
GGML_ABORT("Only support kernel size = 3 or size = 4 right now.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nc == 4) {
|
if (nc == 4) {
|
||||||
@@ -116,8 +119,13 @@ static void ssm_conv_f32_cuda(const float * src0, const float * src1, const int
|
|||||||
dim3 blocks(n_s, (nr + threads - 1) / threads, (n_t + split_n_t - 1) / split_n_t);
|
dim3 blocks(n_s, (nr + threads - 1) / threads, (n_t + split_n_t - 1) / split_n_t);
|
||||||
ssm_conv_long_token_f32<threads, 4, split_n_t><<<blocks, threads, 0, stream>>>(
|
ssm_conv_long_token_f32<threads, 4, split_n_t><<<blocks, threads, 0, stream>>>(
|
||||||
src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1, dst, dst_nb0, dst_nb1, dst_nb2, n_t);
|
src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1, dst, dst_nb0, dst_nb1, dst_nb2, n_t);
|
||||||
|
} else if (nc == 3) {
|
||||||
|
const int64_t split_n_t = 32;
|
||||||
|
dim3 blocks(n_s, (nr + threads - 1) / threads, (n_t + split_n_t - 1) / split_n_t);
|
||||||
|
ssm_conv_long_token_f32<threads, 3, split_n_t><<<blocks, threads, 0, stream>>>(
|
||||||
|
src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1, dst, dst_nb0, dst_nb1, dst_nb2, n_t);
|
||||||
} else {
|
} else {
|
||||||
GGML_ABORT("Only support kernel size = 4 right now.");
|
GGML_ABORT("Only support kernel size = 3 or size = 4 right now.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user