Skip to content

Commit 94a83e9

Browse files
committed
Fix MtmdInputChunkType win build & default bs 1
Signed-off-by: Dennis Keck <[email protected]>
1 parent e9b1951 commit 94a83e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/mtmd/src/mtmd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub struct MtmdCliParams {
5151
#[arg(short = 't', long = "threads", value_name = "N", default_value = "4")]
5252
pub n_threads: i32,
5353
/// Number of tokens to process in a batch during eval chunks
54-
#[arg(long = "batch-size", value_name = "b", default_value = "64")]
54+
#[arg(long = "batch-size", value_name = "b", default_value = "1")]
5555
pub batch_size: i32,
5656
/// Maximum number of tokens in context
5757
#[arg(long = "n-tokens", value_name = "N", default_value = "4096")]

llama-cpp-2/src/mtmd.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ use crate::token::LlamaToken;
2525
/// let audio_chunk = MtmdInputChunkType::Audio;
2626
///
2727
/// assert_eq!(text_chunk, MtmdInputChunkType::Text);
28-
/// assert_eq!(text_chunk as u32, llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_TEXT);
28+
/// assert_eq!(text_chunk, llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_TEXT.into());
2929
/// assert_ne!(text_chunk, image_chunk);
3030
/// ```
3131
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3232
#[repr(u32)]
3333
pub enum MtmdInputChunkType {
3434
/// Text input chunk
35-
Text = llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_TEXT,
35+
Text = llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_TEXT as _,
3636
/// Image input chunk
37-
Image = llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_IMAGE,
37+
Image = llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_IMAGE as _,
3838
/// Audio input chunk
39-
Audio = llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_AUDIO,
39+
Audio = llama_cpp_sys_2::MTMD_INPUT_CHUNK_TYPE_AUDIO as _,
4040
}
4141

4242
impl From<llama_cpp_sys_2::mtmd_input_chunk_type> for MtmdInputChunkType {

0 commit comments

Comments
 (0)