| alcuna2pairs |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils_datafile.py code served (permissive licence) · get_code("1c8790831419aa34") 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 list. 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 json
import tempfile
import os
# Create a temporary JSON file with the expected structure
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "test_data.json")
# Create sample data matching the expected structure
data = {
"item1": [
{
"form": "multi-choice",
"question": "What is 2+2?",
"answers": [4, 5, 6]
},
{
"form": "open-ended",
"question": "Explain gravity",
"answers": "Gravity is a force"
}
],
"item2": [
{
"form": "multi-choice",
"question": "What is the capital of France?",
"answers": ["Paris", "London", "Berlin"]
},
{
"form": "open-ended",
"question": "What is AI?",
"answers": "AI is artificial intelligence"
}
]
}
with open(json_path, 'w') as f:
json.dump(data, f)
ARGS = {
"jsonpath": json_path,
"question_type": "multi-choice"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list 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
|
| batch_index |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
pkulcwmzx/knowledge-boundary/utils.py code served (permissive licence) · get_code("042a558be7481c16") 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 3, dtype family float, shape (2, 3, 4) 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)
# For the 3D case: target_tensor should be indexable by [range_tensor_1, range_tensor_2, index_tensor]
# index_tensor has shape (shape_1, shape_2, shape_3)
# range_tensor_1 has shape (shape_1, shape_2, shape_3) with values 0 to shape_1-1
# range_tensor_2 has shape (shape_1, shape_2, shape_3) with values 0 to shape_2-1
# So target_tensor needs shape (shape_1, shape_2, ...)
# Let's use a 3D case: shape_1=2, shape_2=3, shape_3=4
shape_1, shape_2, shape_3 = 2, 3, 4
# target_tensor should have at least 3 dimensions
# The indexing is target_tensor[range_tensor_1, range_tensor_2, index_tensor]
# where index_tensor values are indices into the third dimension
# So target_tensor shape should be (shape_1, shape_2, max_index_value)
target_tensor_3d = torch.randn(shape_1, shape_2, 5)
# index_tensor has shape (2, 3, 4) with values that index into dim 2 of target_tensor
index_tensor_3d = torch.randint(0, 5, (shape_1, shape_2, shape_3)).long()
# For the 2D case
# target_tensor[range_vector, index_tensor] where range_vector shape is (shape_0, 1) and index_tensor shape is (shape_0, shape_1)
# This means target_tensor should have shape (shape_0, shape_1) or compatible
shape_0 = 2
target_tensor_2d = torch.randn(shape_0, 4)
index_tensor_2d = torch.randint(0, 4, (shape_0, 3)).long()
# Test with 3D case
ARGS = {
"target_tensor": target_tensor_3d,
"index_tensor": index_tensor_3d,
}
- 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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) 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
|
| batch_questions |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils.py code served (permissive licence) · get_code("e11d3d97fcb16519") 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 dict. 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)
class StandInTokenizer:
def __init__(self):
self.pad_token = None
self.vocab_size = 1000
def add_special_tokens(self, special_tokens):
if 'pad_token' in special_tokens:
self.pad_token = special_tokens['pad_token']
def __call__(self, texts, padding=None, truncation=None, return_tensors=None):
# Simple mock tokenizer that returns token IDs
batch_size = len(texts) if isinstance(texts, list) else 1
seq_length = 8
# Create dummy token IDs
token_ids = torch.randint(0, self.vocab_size, (batch_size, seq_length))
attention_mask = torch.ones_like(token_ids)
result = {
'input_ids': token_ids,
'attention_mask': attention_mask
}
return result
class StandInModel(nn.Module):
def __init__(self):
super().__init__()
self.embedding = nn.Embedding(1000, 16)
self.linear = nn.Linear(16, 4)
def forward(self, input_ids, attention_mask=None):
return self.embedding(input_ids)
questions = [
"What is machine learning?",
"How does deep learning work?"
]
model = StandInModel()
tokenizer = StandInTokenizer()
ARGS = {
'questions': questions,
'model': model,
'tokenizer': tokenizer
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
|
| evaluate |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils_eval.py code served (permissive licence) · get_code("833ecf7a36f47a2f") 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 int, ndim 0, dtype family int, shape () 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 as nn
torch.manual_seed(0)
# Define a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
def __init__(self, vocab_size=100, hidden_dim=4):
super().__init__()
self.linear = nn.Linear(hidden_dim, vocab_size)
def forward(self, input_embeds):
# input_embeds shape: (batch_size, seq_len, hidden_dim)
# output logits shape: (batch_size, seq_len, vocab_size)
logits = self.linear(input_embeds)
# Create a simple output object with logits attribute
class ModelOutput:
pass
output = ModelOutput()
output.logits = logits
return output
# Minimal tokenizer (not actually used in the function body)
class MinimalTokenizer:
pass
# Create instances
model = MinimalModel(vocab_size=100, hidden_dim=4)
tokenizer = MinimalTokenizer()
# Set up parameters
batch_size = 2
seq_len = 5
output_length = 2
hidden_dim = 4
vocab_size = 100
# Create full_embeddings: (batch_size, seq_len, hidden_dim)
full_embeddings = torch.randn(batch_size, seq_len, hidden_dim)
# Create labels that match the output sequence we expect to match
# labels shape: (output_length,) since we compare with gen_output[i, :]
labels = torch.tensor([42, 55])
# candidate_tokens (not used in function, but required parameter)
candidate_tokens = list(range(vocab_size))
# tok_id (not used in function, but required parameter)
tok_id = 0
ARGS = {
"model": model,
"tokenizer": tokenizer,
"candidate_tokens": candidate_tokens,
"full_embeddings": full_embeddings,
"tok_id": tok_id,
"labels": labels,
"output_length": output_length,
}
- 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 int, ndim 0, dtype family int, shape () — shape () 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
|
| get_discriminate |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/run_baseline_prompt.py code served (permissive licence) · get_code("93d0ddd0909385c0") 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 list, ndim 1, 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
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - prompts: used with list(map(...)) so needs to be iterable
# - answer: concatenated with each prompt string using f-string
# Both are used in string operations, so they should be strings
# Create minimal valid arguments
prompts = [
"Is 2 + 2 equal to 4? ",
"Is the Earth flat? "
]
answer = "Yes."
ARGS = {
"prompts": prompts,
"answer": answer
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list 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
|
| get_raw_embedding_table |
Ran ran, honoured the contract we drafted |
pkulcwmzx/knowledge-boundary/model_utils.py code served (permissive licence) · get_code("31e17daaa5baa13e") 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 Parameter, ndim 2, 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
import torch.nn as nn
torch.manual_seed(0)
class SimpleEmbeddingModel(nn.Module):
def __init__(self):
super().__init__()
self.embedding = nn.Embedding(num_embeddings=10, embedding_dim=4)
def get_input_embeddings(self):
return self.embedding
model = SimpleEmbeddingModel()
ARGS = {
'model': model
}
- 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 Parameter, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded Tensor ndim 2, which disagrees with the fixture run
- 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
|
| log_perplexity_loss |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
pkulcwmzx/knowledge-boundary/utils_loss.py code served (permissive licence) · get_code("e82788514c8b7bc2") 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 0, dtype family float, shape () 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 as nn
from torch.nn import functional as F
torch.manual_seed(0)
# Set up tensor arguments
batch_size = 2
seq_len = 5
vocab_size = 4
# logits: shape [batch_size, seq_len, vocab_size]
# These are raw model outputs before softmax
logits = torch.randn(batch_size, seq_len, vocab_size)
# prompts: shape [batch_size, seq_len]
# These are token indices that we'll use to gather log probs
prompts = torch.randint(0, vocab_size, (batch_size, seq_len))
# question_len: shape [batch_size]
# Length of each sequence in the batch
question_len = torch.tensor([4, 3])
ARGS = {
"logits": logits,
"prompts": prompts,
"question_len": question_len,
}
- 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 0, dtype family float, shape () — shape () 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
|
| log_prob_loss |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils_loss.py code served (permissive licence) · get_code("facc8bf34362700f") 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 0, dtype family float, shape () 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 as nn
torch.manual_seed(0)
# Create small tensors
# logits: shape (batch=2, seq_len=5, vocab_size=4)
# labels: shape (batch=2, seq_len=5)
logits = torch.randn(2, 5, 4)
labels = torch.randint(0, 4, (2, 5))
# Create a loss function
# The function reshapes to (-1, vocab_size) and (-1,) so we need CrossEntropyLoss
loss_fct = nn.CrossEntropyLoss()
# Temperature parameter
temp = 1.0
ARGS = {
"logits": logits,
"labels": labels,
"loss_fct": loss_fct,
"temp": temp
}
- 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 0, dtype family float, shape () — shape () 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
|
| pass_test |
Ran ran, violated the contract we drafted |
pkulcwmzx/knowledge-boundary/utils_eval.py code served (permissive licence) · get_code("e7c7db7209eba73f") 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 bool, ndim 0, dtype family float, shape () 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)
class ArgsStandIn:
def __init__(self):
self.device = 'cpu'
# Create args object
args = ArgsStandIn()
# Create decode_toks: shape (batch_size=2, sequence_length=5)
# Contains token indices
decode_toks = torch.tensor([
[1, 2, 3, 4, 5],
[2, 3, 4, 5, 6]
], dtype=torch.long)
# Create tokenized_ans: list of lists of token indices
# Each sublist represents tokenized answer to match against
tokenized_ans = [
[2, 3], # This will match in decode_toks[0, 1:3] and decode_toks[1, 0:2]
[4, 5], # This will match in decode_toks[0, 3:5] and decode_toks[1, 2:4]
]
ARGS = {
'args': args,
'decode_toks': decode_toks,
'tokenized_ans': tokenized_ans
}
- 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 bool, ndim 0, dtype family float, shape () — shape () 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
|
| rome2pairs |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils_datafile.py code served (permissive licence) · get_code("d0acf7ffcbea7312") 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 list. 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 json
import tempfile
import os
# Create a temporary JSON file with the expected structure
temp_dir = tempfile.mkdtemp()
jsonpath = os.path.join(temp_dir, "rome_data.json")
# Build sample data matching the function's expected structure
sample_data = [
{
"paraphrase_prompts": [
"What is the capital of France?",
"Name the capital of France."
],
"requested_rewrite": {
"prompt": "The capital of {} is",
"subject": "France",
"relation_id": "P36",
"target_true": {
"str": "Paris",
"id": "Q90"
},
"target_new": {
"str": "Lyon",
"id": "Q322"
}
}
},
{
"paraphrase_prompts": [
"Who wrote Shakespeare?",
"Shakespeare was written by?"
],
"requested_rewrite": {
"prompt": "{} wrote many plays",
"subject": "William Shakespeare",
"relation_id": "P31",
"target_true": {
"str": "playwright",
"id": "Q11565"
},
"target_new": {
"str": "author",
"id": "Q36180"
}
}
}
]
# Write the sample data to the temporary JSON file
with open(jsonpath, 'w') as f:
json.dump(sample_data, f)
ARGS = {
"jsonpath": jsonpath,
"real_data": False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list 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
|
| similarity_loss |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils_loss.py code served (permissive licence) · get_code("3bb211327ce4cced") 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 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import nn
torch.manual_seed(0)
# Create logits tensor: shape (batch_size=2, seq_len=5, vocab_size=4)
logits = torch.randn(2, 5, 4)
# Create ref_logits tensor: shape (batch_size=2, embedding_dim=4)
ref_logits = torch.randn(2, 4)
# Create question_len: indices into the sequence dimension for each batch item
question_len = torch.tensor([1, 3])
ARGS = {
'logits': logits,
'ref_logits': ref_logits,
'question_len': question_len,
}
- 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 0, dtype family float, shape () — shape () 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
|
| test_one_case |
Ran ran; our contract draft was wrong, not the code |
pkulcwmzx/knowledge-boundary/utils_eval.py code served (permissive licence) · get_code("855876231279297b") 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
import torch.nn.functional as F
torch.manual_seed(0)
class StandInModel(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 5)
def forward(self, inputs_embeds):
# inputs_embeds shape: (batch_size, seq_len, embedding_dim)
# output logits shape: (batch_size, seq_len, vocab_size)
batch_size, seq_len, emb_dim = inputs_embeds.shape
logits = self.linear(inputs_embeds)
# Create a simple output object with logits attribute
class Output:
pass
output = Output()
output.logits = logits
return output
model = StandInModel()
# test_embeddings: (batch_size=2, seq_len=3, embedding_dim=4)
test_embeddings = torch.randn(2, 3, 4)
# batched_inverse_label_mask: boolean mask for (batch_size=2, seq_len=2)
# The function uses log_probs[:, :-1, :] which removes last token, so seq_len becomes 2
batched_inverse_label_mask = torch.tensor([
[True, False],
[False, True]
])
ARGS = {
"model": model,
"test_embeddings": test_embeddings,
"batched_inverse_label_mask": batched_inverse_label_mask
}
- 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
|
| get_model_and_tokenizer |
Not yet run unverified (harvested, no recorded run) |
pkulcwmzx/knowledge-boundary/model_utils.py code served (permissive licence) · get_code("3244f3e967f2f156") How it ran |
| parse_args |
Not yet run unverified (harvested, no recorded run) |
pkulcwmzx/knowledge-boundary/args.py code served (permissive licence) · get_code("63e2574a77d8e69c") How it ran |