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

Method contains_tensor

cake-core/src/utils/gptq.rs:272–280  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

270 }
271
272 fn contains_tensor(&self, name: &str) -> bool {
273 // A tensor is "present" if either its direct name, GPTQ qweight, or scales exist.
274 if self.inner.get(name).is_ok() {
275 return true;
276 }
277 let prefix = name.strip_suffix(".weight").unwrap_or(name);
278 self.inner.get(&format!("{prefix}.qweight")).is_ok()
279 || self.inner.get(&format!("{prefix}.scales")).is_ok()
280 }
281}
282
283/// Create a VarBuilder that transparently dequantizes GPTQ 4-bit weights.

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected