Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

remove device

roryclear63bd8ccc9e61
diff --git a/utils/model.py b/utils/model.py
index bc7fe59..9c0d939 100644
--- a/utils/model.py
+++ b/utils/model.py
@@ -6,9 +6,9 @@ from tinygrad.llm.gguf import gguf_load
from tinygrad.uop.ops import resolve
@functools.cache
-def precompute_freqs_cis(dim: int, end: int, theta: float = 10000.0, device:str|None=None) -> Tensor:
- freqs = 1.0 / (theta ** (Tensor.arange(0, dim, 2, device=device)[:(dim // 2)] / dim))
- freqs = Tensor.arange(end, device=device).unsqueeze(dim=1) * freqs.unsqueeze(dim=0)
+def precompute_freqs_cis(dim: int, end: int, theta: float = 10000.0) -> Tensor:
+ freqs = 1.0 / (theta ** (Tensor.arange(0, dim)[:(dim // 2)] / dim))
+ freqs = Tensor.arange(end).unsqueeze(dim=1) * freqs.unsqueeze(dim=0)
return freqs.cos().cat(freqs.sin(), dim=-1).contiguous()
class ExpertWeights: