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

Function f32_tensor

cake-core/src/models/common/text_model.rs:537–539  ·  view source on GitHub ↗

Helper: create a 1-D F32 tensor from a slice.

(data: &[f32])

Source from the content-addressed store, hash-verified

535
536 /// Helper: create a 1-D F32 tensor from a slice.
537 fn f32_tensor(data: &[f32]) -> Tensor {
538 Tensor::from_slice(data, (data.len(),), &Device::Cpu).unwrap()
539 }
540
541 // ── apply_repeat_penalty_gpu ─────────────────────────────────
542

Calls

no outgoing calls