pub struct MimoVit {
pub cfg: MimoVisionConfig,
/* private fields */
}Expand description
The MiMo vision transformer and its patch merger.
Fields§
§cfg: MimoVisionConfigImplementations§
Source§impl MimoVit
impl MimoVit
Sourcepub fn from_model(model: &Arc<CmfModel>) -> Result<Self, String>
pub fn from_model(model: &Arc<CmfModel>) -> Result<Self, String>
Load from a CMF that carries visual.* and the mm.config_json blob.
Sourcepub fn from_model_with_config(
model: &Arc<CmfModel>,
config: &Value,
) -> Result<Self, String>
pub fn from_model_with_config( model: &Arc<CmfModel>, config: &Value, ) -> Result<Self, String>
Load visual.* from model with an explicit config (config.json
or its vision_config).
pub fn set_sink_mode(&mut self, mode: SinkMode)
pub fn sink_mode(&self) -> SinkMode
Sourcepub fn set_gpu_attention(&mut self, on: bool)
pub fn set_gpu_attention(&mut self, on: bool)
Allow (default) or forbid the device attention for the full blocks.
Auto Trait Implementations§
impl !RefUnwindSafe for MimoVit
impl !UnwindSafe for MimoVit
impl Freeze for MimoVit
impl Send for MimoVit
impl Sync for MimoVit
impl Unpin for MimoVit
impl UnsafeUnpin for MimoVit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more