Skip to main content

llama_cpp_bindings/mtmd/
mtmd_eval_error.rs

1use crate::mtmd::image_chunk_batch_size_mismatch::ImageChunkBatchSizeMismatch;
2
3#[derive(thiserror::Error, Debug)]
4pub enum MtmdEvalError {
5    #[error("batch size {requested} exceeds context batch size {context_max}")]
6    BatchSizeExceedsContextLimit { requested: i32, context_max: u32 },
7    #[error(
8        "image chunk has {} tokens but n_batch is {}",
9        .0.image_tokens,
10        .0.n_batch,
11    )]
12    ImageChunkExceedsBatchSize(ImageChunkBatchSizeMismatch),
13    #[error("multimodal chunk eval failed with code: {code}")]
14    EvalFailed { code: i32 },
15    #[error("not enough memory")]
16    NotEnoughMemory,
17    #[error("{message}")]
18    Reported { message: String },
19}