| ARCHeadPacked |
Ran ran on a synthesized input · constructed an object; no result was computed |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("475fd2cc8062ba47") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ARCHeadPacked: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Small tensor dimensions: batch=2, features=4, latent=3, output=5
batch_size = 2
feature_dim = 4
latent_dim = 3
output_dim = 5
groups = 2
# Create small packed tensors for R (int4 packed format)
# R_packed should be int8 with packed int4 values
R_packed = torch.randint(-128, 127, (output_dim, feature_dim), dtype=torch.int8)
# R_scales_packed: int4 packed scales
R_scales_packed = torch.randint(-128, 127, (output_dim, groups), dtype=torch.int8)
# R_scale_max: scaling factor
R_scale_max = torch.tensor([1.0], dtype=torch.float16)
# A_int8: quantized matrix A
A_int8 = torch.randint(-127, 127, (latent_dim, groups * feature_dim), dtype=torch.int8)
# A_scales: per-group scales for A
A_scales = torch.ones(latent_dim, groups, dtype=torch.float16)
# A_pad: padding amount
A_pad = 0
# B_int8: quantized matrix B
B_int8 = torch.randint(-127, 127, (feature_dim, groups * feature_dim), dtype=torch.int8)
# B_scales: per-group scales for B
B_scales = torch.ones(feature_dim, groups, dtype=torch.float16)
# B_pad: padding amount
B_pad = 0
# Optional Aw_packed, Aw_scales, Aw_smax, Bc_packed, Bc_scales, Bc_pad (can be None)
Aw_packed = None
Aw_scales = None
Aw_smax = None
Bc_packed = None
Bc_scales = None
Bc_pad = None
# residual_type: string parameter
residual_type = "add"
# stats: dictionary of statistics
stats = {"mean": 0.0, "std": 1.0}
ARGS = {
"R_packed": R_packed,
"R_scales_packed": R_scales_packed,
"R_scale_max": R_scale_max,
"A_int8": A_int8,
"A_scales": A_scales,
"A_pad": A_pad,
"B_int8": B_int8,
"B_scales": B_scales,
"B_pad": B_pad,
"Aw_packed": Aw_packed,
"Aw_scales": Aw_scales,
"Aw_smax": Aw_smax,
"Bc_packed": Bc_packed,
"Bc_scales": Bc_scales,
"Bc_pad": Bc_pad,
"residual_type": residual_type,
"stats": stats,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ARCHeadPacked — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ARCHeadPacked output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| CompressedHead |
Ran ran on a synthesized input · constructed an object; no result was computed |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("7be9cd1d083b3f12") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, CompressedHead: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create small tensors with distinct dimensions
# Wd: weight matrix, used in h @ self.Wd.T, so if h is (batch, hidden), Wd should be (output, hidden)
batch_size = 2
hidden_dim = 4
output_dim = 3
intermediate_dim = 5
Wd = torch.randn(output_dim, hidden_dim)
# Aw and Bc are optional, but when present:
# h @ self.Bc.T @ self.Aw.T means:
# h is (batch, hidden_dim)
# Bc.T means Bc is (intermediate_dim, hidden_dim)
# Aw.T means Aw is (output_dim, intermediate_dim)
Aw = torch.randn(output_dim, intermediate_dim)
Bc = torch.randn(intermediate_dim, hidden_dim)
# stats dict - can be any dict, used for storage
stats = {
"mean": 0.5,
"std": 1.0,
"count": 100
}
ARGS = {
"Wd": Wd,
"Aw": Aw,
"Bc": Bc,
"stats": stats
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type CompressedHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CompressedHead output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| LMHeadConfig |
Ran ran on a synthesized input · constructed an object; no result was computed |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("e220e73affd6d602") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, LMHeadConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from dataclasses import dataclass
torch.manual_seed(0)
ARGS = {
'name': 'test_lm_head',
'core': 'am',
'core_rank': 8,
'group_R': 64,
'row_alpha': 0.0,
'col_beta': 0.0,
'metric_power': 0.75,
'metric_ridge': 0.001,
'residual': 'am_rownorm_i4',
'residual_rank': 5,
'quant_group': 64,
'packed': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type LMHeadConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LMHeadConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _pad_cols |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("6f7f45db26e94ae1") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small tensor with shape (batch=2, features=5)
# We use 5 features so that padding behavior can be tested with different g values
X = torch.randn(2, 5)
# Test with g=3 (will require padding)
g = 3
ARGS = {
"X": X,
"g": g,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compress_gptq |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("f99f8e31bb13809c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned CompressedHead. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create small tensors for testing
# W_cpu: (V, D) - weight matrix where V=vocab_size, D=hidden_size
V, D = 8, 4
W_cpu = torch.randn(V, D, dtype=torch.float32)
# h_train_cpu: (batch_size, D) - training hidden states
batch_size = 2
h_train_cpu = torch.randn(batch_size, D, dtype=torch.float32)
ARGS = {
'W_cpu': W_cpu,
'h_train_cpu': h_train_cpu,
'bits': 4,
'group_size': 2,
'damp': 0.01,
'block_size': 2,
'device': 'cpu',
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type CompressedHead — a CompressedHead output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CompressedHead output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| int4_dq_per_row |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("5783ff7794088771") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function int4_dq_per_row takes a single tensor argument X
# and performs quantization/dequantization operations on it.
# It expects X to be a 2D tensor (based on dim=1 usage in amax)
# Create a small test tensor: shape (2, 4) - batch size 2, dimension 4
X = torch.randn(2, 4)
ARGS = {
"X": X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| int4_dq_per_row_packed |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("7fd8f73785679df0") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small tensor for X parameter
# Shape: (2, 4) - 2 rows, 4 columns
# Values should be in a range that makes sense for int4 quantization
X = torch.randn(2, 4) * 7 # Scale to use the range [-7, 7] reasonably
ARGS = {
"X": X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| int8_dq_per_row |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("0ad3c214dca74fd6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function int8_dq_per_row takes a single parameter X which is a torch.Tensor
# It performs operations on X including:
# - .float() conversion
# - .abs()
# - .amax(dim=1, keepdim=True) - reduction along dimension 1
# - .clamp() operations
# - .half() conversion
# - .round()
# - .numel() and .shape[0] access
# So X needs to be a 2D tensor with at least 2 rows
X = torch.randn(2, 4) # Small 2D tensor: 2 rows, 4 columns
ARGS = {
"X": X,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| int8_dq_per_row_packed |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("66bcf153b0a61ad2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# X should be a float tensor with shape (batch_size, feature_dim)
# The function performs per-row quantization to int8
X = torch.randn(2, 4, dtype=torch.float32)
ARGS = {
"X": X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| lowrank_rand |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("e7dbcf53f4f4270a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create a small test matrix for low-rank approximation
# Using distinct dimensions: 5 rows, 4 columns
M = torch.randn(5, 4, dtype=torch.float32)
# Parameters for the function
r = 2 # target rank
oversampling = 10 # oversampling parameter
ARGS = {
"M": M,
"r": r,
"oversampling": oversampling,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_kernel_fused_dequant_row |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("09c2bd65d9e48901") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# The function signature is:
# make_kernel_fused_dequant_row(BLOCK_M=128, BLOCK_N=128, BLOCK_K=64, GROUP_M=4, num_warps=8, num_stages=3)
# This function returns a callable `call(h, Wd_q_t, Wd_scale, A, B)`
# Looking at the body:
# - h: shape (M, K), used in matrix mult and h @ B.t()
# - Wd_q_t: shape (K, N), quantized weights, used in matmul
# - Wd_scale: shape (N,), scale factors, indexed with [None, :]
# - A: shape (r, something), A.t().contiguous() is called, A.shape[1] used
# - B: shape (something, K), B.t() is called
# Build tiny test tensors
M = 2 # batch size
K = 4 # hidden/key dimension
N = 3 # output dimension
r = 2 # rank for A
h = torch.randn(M, K, dtype=torch.float16)
Wd_q_t = torch.randint(0, 256, (K, N), dtype=torch.uint8)
Wd_scale = torch.randn(N, dtype=torch.float16)
A = torch.randn(r, K, dtype=torch.float16)
B = torch.randn(r, K, dtype=torch.float16)
ARGS = {
'BLOCK_M': 128,
'BLOCK_N': 128,
'BLOCK_K': 64,
'GROUP_M': 4,
'num_warps': 8,
'num_stages': 3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_metric |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("df6233d5637db742") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# h_train: torch.Tensor - used as float tensor with shape (batch, d)
# The function accesses h.shape[0] (batch size) and h.shape[1] (dimension)
# Then computes h.T @ h / h.shape[0] to get a covariance matrix
h_train = torch.randn(2, 4) # batch_size=2, dimension=4
# power: float - used in e.pow(power)
power = 2.0
# ridge: float - used as a scalar multiplier for regularization
ridge = 0.1
ARGS = {
"h_train": h_train,
"power": power,
"ridge": ridge,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| pack_int4 |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("87be27c4f4213c52") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small tensor with values that fit in 4 bits (0-15)
# Shape: (2, 4) - batch of 2, dimension 4
X = torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=torch.int32)
ARGS = {
"X": X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family int, shape (2, 2) — shape (2, 2) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| quant_group |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("f9c7158e8e46dfe1") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small tensor for quantization
# Shape: (2, 4) - 2 rows, 4 columns
X = torch.randn(2, 4, dtype=torch.float32)
# Define parameters
bits = 8
group_size = 2
scale_bytes_per = 2
ARGS = {
"X": X,
"bits": bits,
"group_size": group_size,
"scale_bytes_per": scale_bytes_per,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| quant_group_packed |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("b4bce7789e31d1c4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small test tensor with shape (batch=2, dim=4)
X = torch.randn(2, 4)
# Define arguments for quant_group_packed
ARGS = {
"X": X,
"bits": 4,
"group_size": 2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| quantize_Wd_per_row_int8 |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("073277642104b103") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Wd should be a 2D tensor with shape (rows, cols)
# The function computes per-row quantization
# It uses: abs(), amax(dim=1), clamp, float(), round(), to(torch.int8), t(), squeeze(1), to(torch.float16)
Wd = torch.randn(2, 4)
ARGS = {
"Wd": Wd
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| sc4_quant_R |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("37348d6bf052f8bd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# R is a 2D tensor with shape (V, D) where D must be divisible by g
# V = 2 (num rows), D = 4 (must be divisible by g)
# g = 2 (group size)
V = 2
D = 4
g = 2
R = torch.randn(V, D)
ARGS = {
"R": R,
"g": g,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| sc4_quant_R_packed |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("9427bb505bf281e0") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small tensor R with shape (V, D) where V=2, D=12
# D should be divisible by g for the reshape operations
V = 2
D = 12
g = 3 # g divides D evenly
# R should be a float tensor with reasonable values
R = torch.randn(V, D, dtype=torch.float32)
ARGS = {
"R": R,
"g": g,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| unpack_int4 |
Ran ran; our contract draft was wrong, not the code |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("8d0cffe63ad4024f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function unpacks int4 values from a packed tensor
# X_packed should be a uint8 tensor where each byte contains two int4 values
# The function extracts low and high 4-bit values and expands them
# Create a small packed tensor with shape (2, 4) containing uint8 values
# Each uint8 value encodes two int4 values
X_packed = torch.tensor([
[0x12, 0xAB, 0xF3, 0x45],
[0x67, 0x89, 0xCD, 0xEF]
], dtype=torch.uint8)
ARGS = {
"X_packed": X_packed
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family int, shape (2, 8) — shape (2, 8) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compress_lm_head |
Not yet run unverified (harvested, no recorded run) |
suayptalha/archead/archead/lm_head_methods.py code served (permissive licence) · get_code("b3f401d1268426a1") How it ran |