From 81cec86e758390e5f025a6e93888673b003fb4c8 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 3 Jul 2023 11:55:54 +0200 Subject: Adding a bit more docs around safety. --- candle-core/examples/llama/weights.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'candle-core/examples/llama/weights.rs') diff --git a/candle-core/examples/llama/weights.rs b/candle-core/examples/llama/weights.rs index cc3fccd4..c3364cef 100644 --- a/candle-core/examples/llama/weights.rs +++ b/candle-core/examples/llama/weights.rs @@ -105,7 +105,7 @@ impl Llama { ) -> Result { let handles: Vec<_> = filenames .iter() - .map(candle::safetensors::MmapedFile::new) + .map(|f| unsafe { candle::safetensors::MmapedFile::new(f) }) .collect::>>()?; let tensors: Vec<_> = handles .iter() -- cgit v1.2.3