diff --git a/challenges/easy/52_silu/challenge.py b/challenges/easy/52_silu/challenge.py
index 491379cf..c6f929d3 100644
--- a/challenges/easy/52_silu/challenge.py
+++ b/challenges/easy/52_silu/challenge.py
@@ -29,8 +29,8 @@ def get_solve_signature(self) -> Dict[str, tuple]:
def generate_example_test(self) -> Dict[str, Any]:
dtype = torch.float32
- N = 4
- input = torch.tensor([1.0, 2.0, 3.0, 4.0], device=self.device, dtype=dtype)
+ N = 3
+ input = torch.tensor([0.5, 1.0, -0.5], device=self.device, dtype=dtype)
output = torch.empty(N, device=self.device, dtype=dtype)
return {
"input": input,
diff --git a/challenges/hard/14_multi_agent_sim/challenge.py b/challenges/hard/14_multi_agent_sim/challenge.py
index a730931c..f6d1e618 100644
--- a/challenges/hard/14_multi_agent_sim/challenge.py
+++ b/challenges/hard/14_multi_agent_sim/challenge.py
@@ -81,7 +81,7 @@ def generate_example_test(self) -> Dict[str, Any]:
dtype = torch.float32
N = 2
agents = torch.tensor(
- [0.0, 0.0, 1.0, 0.0, 5.0, 0.0, 0.0, 1.0], device=self.device, dtype=dtype
+ [0.0, 0.0, 1.0, 0.0, 3.0, 4.0, 0.0, -1.0], device=self.device, dtype=dtype
)
agents_next = torch.empty(4 * N, device=self.device, dtype=dtype)
return {
diff --git a/challenges/medium/40_batch_normalization/challenge.html b/challenges/medium/40_batch_normalization/challenge.html
index 26c8b27d..ee8e4ddb 100644
--- a/challenges/medium/40_batch_normalization/challenge.html
+++ b/challenges/medium/40_batch_normalization/challenge.html
@@ -27,7 +27,7 @@
Example 1:
gamma = [1.0, 1.0]
beta = [0.0, 0.0]
eps = 1e-5
-Output: output = [[-1.224, -1.224], [0.0, 0.0], [1.224, 1.224]]
+Output: output = [[-1.225, -1.225], [0.0, 0.0], [1.225, 1.225]]
Example 2:
diff --git a/challenges/medium/5_softmax/challenge.html b/challenges/medium/5_softmax/challenge.html
index 67f1afe1..76898e0a 100644
--- a/challenges/medium/5_softmax/challenge.html
+++ b/challenges/medium/5_softmax/challenge.html
@@ -24,7 +24,7 @@ Implementation Requirements
Example 1:
Input: [1.0, 2.0, 3.0], N = 3
-Output: [0.090, 0.244, 0.665] (approximately)
+Output: [0.090, 0.245, 0.665] (approximately)
Example 2:
diff --git a/challenges/medium/61_rope_embedding/challenge.py b/challenges/medium/61_rope_embedding/challenge.py
index eea0f3af..5502ea7c 100644
--- a/challenges/medium/61_rope_embedding/challenge.py
+++ b/challenges/medium/61_rope_embedding/challenge.py
@@ -55,13 +55,19 @@ def _half_split(self, table: torch.Tensor) -> torch.Tensor:
return table
def generate_example_test(self) -> Dict[str, Any]:
- M = 1024
- D = 64
+ M = 2
+ D = 4
dtype = torch.float32
- Q = torch.randn(M, D, device=self.device, dtype=dtype)
- Cos = self._half_split(torch.randn(M, D, device=self.device, dtype=dtype))
- Sin = self._half_split(torch.randn(M, D, device=self.device, dtype=dtype))
+ Q = torch.tensor(
+ [[1.0, 2.0, 3.0, 4.0], [1.0, 1.0, 1.0, 1.0]], device=self.device, dtype=dtype
+ )
+ Cos = torch.tensor(
+ [[1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0]], device=self.device, dtype=dtype
+ )
+ Sin = torch.tensor(
+ [[0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0]], device=self.device, dtype=dtype
+ )
Output = torch.zeros(M, D, device=self.device, dtype=dtype)
return {
diff --git a/challenges/medium/64_weight_dequantization/challenge.py b/challenges/medium/64_weight_dequantization/challenge.py
index c952f5f6..d6adf6d0 100644
--- a/challenges/medium/64_weight_dequantization/challenge.py
+++ b/challenges/medium/64_weight_dequantization/challenge.py
@@ -40,13 +40,19 @@ def get_solve_signature(self) -> Dict[str, tuple]:
}
def generate_example_test(self) -> Dict[str, Any]:
- M, N = 256, 256
- TILE_SIZE = 128
- X = torch.randn(M, N, device=self.device, dtype=torch.float32)
- # S shape
- s_rows = (M + TILE_SIZE - 1) // TILE_SIZE
- s_cols = (N + TILE_SIZE - 1) // TILE_SIZE
- S = torch.randn(s_rows, s_cols, device=self.device, dtype=torch.float32)
+ M, N = 4, 4
+ TILE_SIZE = 2
+ X = torch.tensor(
+ [
+ [10.0, 10.0, 5.0, 5.0],
+ [10.0, 10.0, 5.0, 5.0],
+ [2.0, 2.0, 8.0, 8.0],
+ [2.0, 2.0, 8.0, 8.0],
+ ],
+ device=self.device,
+ dtype=torch.float32,
+ )
+ S = torch.tensor([[0.5, 2.0], [4.0, 0.25]], device=self.device, dtype=torch.float32)
Y = torch.empty_like(X)
return {