MCPcopy Create free account
hub / github.com/evilsocket/cake / get_unchecked

Method get_unchecked

cake-core/src/utils/gguf.rs:224–240  ·  view source on GitHub ↗
(
        &self,
        name: &str,
        dtype: DType,
        dev: &Device,
    )

Source from the content-addressed store, hash-verified

222 }
223
224 fn get_unchecked(
225 &self,
226 name: &str,
227 dtype: DType,
228 dev: &Device,
229 ) -> candle_core::Result<Tensor> {
230 self.tensors
231 .get(name)
232 .ok_or_else(|| {
233 candle_core::Error::CannotFindTensor {
234 path: name.to_string(),
235 }
236 .bt()
237 })?
238 .to_dtype(dtype)?
239 .to_device(dev)
240 }
241
242 fn contains_tensor(&self, name: &str) -> bool {
243 self.tensors.contains_key(name)

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected