mirror of https://gitee.com/namelin2022/ollama
Browse Source
FromFloatSlice and FromIntSlice return an error if the shape doesn't match the passed data or if memory can't be allocated. Since these are inputs, the memory being allocated is system memory rather than VRAM. In many cases, the caller can't really handle the error and panics. Empty and Zeros directly panic if they can't allocate memory. This makes things consistent by panicing for the first two cases, removing a fair amount of error handling code. This is also consistent with how Go typically handles these situations.parth/deepseek-r1-tools
committed by
Jesse Gross
20 changed files with 68 additions and 209 deletions
Loading…
Reference in new issue