| chattify |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/couplets/compute_graphs.py code served (permissive licence) · get_code("67782b3d40e314be") 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 str. 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 MockTokenizer:
def apply_chat_template(self, messages, tokenize=False, add_generation_prompt=False):
# Build a simple chat template output
result = ""
for msg in messages:
role = msg['role']
content = msg['content']
result += f"<|im_start|>{role}\n{content}<|im_end|>\n"
# Add some extra characters at the end to simulate real tokenizer behavior
result += "<|im_end|>\n" + "x" * 11
return result
tokenizer = MockTokenizer()
inputs = [
"Hello, how are you?",
"I'm doing well, thank you!",
"That's great to hear."
]
ARGS = {
"inputs": inputs,
"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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| clean_response |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/animal_stories/interventions.py code served (permissive licence) · get_code("ace61a5456ab6a29") 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 str. 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 re
def clean_response(response: str, first_sentence: str='') -> str:
"""Clean the generated response by removing extra formatting."""
response = re.sub('<think>.*?</think>', '', response, flags=re.DOTALL)
response = re.sub('<think>.*', '', response, flags=re.DOTALL)
response = re.sub('</think>', '', response)
response = response.strip()
if first_sentence and response:
first_clean = first_sentence.rstrip('.!?').strip()
if response.lower().startswith(first_clean.lower()):
response = response[len(first_clean):].strip()
response = response.lstrip('.!?').strip()
return response
ARGS = {
'response': 'This is a test response with <think>some thinking</think> and more text.',
'first_sentence': 'This is a test'
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| detect_animal_in_text |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/animal_stories/evaluate_animal_stories.py code served (permissive licence) · get_code("f34738e6e0cc2759") 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 str. 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 re
def detect_animal_in_text(text: str, animals_set: set[str]) -> str:
"""
Detect which animal is mentioned in the text.
Returns the animal name (original case) or empty string if none found.
"""
if not text or not animals_set:
return ''
text_lower = text.lower()
sorted_animals = sorted(animals_set, key=len, reverse=True)
for animal in sorted_animals:
if ' ' in animal:
if animal in text_lower:
pattern = '\\b' + re.escape(animal) + '\\b'
if re.search(pattern, text_lower):
return animal.title()
else:
pattern = '\\b' + re.escape(animal) + '\\b'
if re.search(pattern, text_lower):
return animal.title()
return ''
ARGS = {
'text': 'I saw a lion and a tiger in the savanna yesterday.',
'animals_set': {'lion', 'tiger', 'elephant', 'giraffe', 'zebra'}
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| load_animals_list |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/animal_stories/evaluate_animal_stories.py code served (permissive licence) · get_code("e3b3bb3933dce84b") 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 set. 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 tempfile
from pathlib import Path
# Create a temporary directory and animals file for testing
temp_dir = tempfile.mkdtemp()
animals_file = Path(temp_dir) / 'animals.txt'
# Write sample animal data to the file
with open(animals_file, 'w', encoding='utf-8') as f:
f.write('Dog\n')
f.write('Cat\n')
f.write('Elephant\n')
f.write('Lion\n')
f.write('\n') # empty line to test stripping
f.write('Tiger\n')
ARGS = {
'animals_file': animals_file
}
- 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
|
| load_animals_list |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/animal_stories/interventions.py code served (permissive licence) · get_code("b7d77e2e505c932f") 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 set. 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.
from pathlib import Path
import tempfile
import os
# Create a temporary directory and file with animal names
temp_dir = tempfile.mkdtemp()
animals_file = Path(temp_dir) / 'animals.txt'
# Write some test animal data to the file
with open(animals_file, 'w', encoding='utf-8') as f:
f.write("Lion\n")
f.write("Tiger\n")
f.write("Bear\n")
f.write("\n") # empty line to test stripping
f.write("Elephant\n")
ARGS = {
'animals_file': animals_file
}
- 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
|
| load_feature_from_binary |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/a_an/load_feature_from_binary.py code served (permissive licence) · get_code("2e859dc76e06610b") 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 json
import gzip
import struct
import tempfile
from pathlib import Path
# Create a temporary directory with the necessary binary files
temp_dir = tempfile.mkdtemp()
temp_path = Path(temp_dir)
# Create sample feature data
feature_data = {
"activation": [1.0, 2.0, 3.0],
"tokens": ["hello", "world"],
"metadata": {"layer": 0, "feature": 0}
}
# Compress and prepare the binary data
feature_json = json.dumps(feature_data).encode('utf-8')
compressed_json = gzip.compress(feature_json)
data_length = len(compressed_json)
# Create binary data with length prefix + compressed JSON
binary_data = struct.pack('<I', data_length) + compressed_json
# Create multiple features to have proper offsets
feature_data_1 = {
"activation": [4.0, 5.0, 6.0],
"tokens": ["foo", "bar"],
"metadata": {"layer": 0, "feature": 1}
}
feature_json_1 = json.dumps(feature_data_1).encode('utf-8')
compressed_json_1 = gzip.compress(feature_json_1)
data_length_1 = len(compressed_json_1)
binary_data_1 = struct.pack('<I', data_length_1) + compressed_json_1
# Write bin file with both features
bin_filename = "layer_0.bin"
bin_path = temp_path / bin_filename
with open(bin_path, 'wb') as f:
f.write(binary_data)
offset_1 = len(binary_data)
f.write(binary_data_1)
offset_2 = len(binary_data) + len(binary_data_1)
# Create index.json.gz
index_data = {
"0": {
"filename": bin_filename,
"offsets": [0, offset_1, offset_2]
}
}
index_path = temp_path / 'index.json.gz'
with gzip.open(index_path, 'wt') as f:
json.dump(index_data, f)
# Define ARGS for the function
ARGS = {
'path': temp_path,
'layer_idx': 0,
'feature_idx': 0
}
- 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 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
|
| load_features_batch |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
hannamw/model-planning-public/a_an/load_feature_from_binary.py code served (permissive licence) · get_code("ab3fbd5f8bb96735") 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 json
import gzip
import struct
from pathlib import Path
import tempfile
import os
# Create a temporary directory structure with valid feature data
tmpdir = tempfile.mkdtemp()
# Create a valid binary file with compressed feature data
bin_filename = "features.bin"
bin_path = Path(tmpdir) / bin_filename
# Create sample feature data
offsets = [0]
binary_data = bytearray()
# Create 3 features with sample data
for feature_idx in range(3):
feature_obj = {"feature_id": feature_idx, "values": [1.0, 2.0, 3.0]}
json_str = json.dumps(feature_obj)
compressed = gzip.compress(json_str.encode('utf-8'))
# Format: 4-byte length + compressed data
data_length = len(compressed)
length_bytes = struct.pack('<I', data_length)
binary_data.extend(length_bytes)
binary_data.extend(compressed)
offsets.append(len(binary_data))
# Write binary file
with open(bin_path, 'wb') as f:
f.write(binary_data)
# Create index.json.gz
index_data = {
"0": {
"filename": bin_filename,
"offsets": offsets
}
}
index_path = Path(tmpdir) / "index.json.gz"
with gzip.open(index_path, 'wt') as f:
json.dump(index_data, f)
ARGS = {
"path": Path(tmpdir),
"layer_idx": 0,
"feature_indices": [0, 1, 2]
}
- 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 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
|
| pick_filtered_in_context_index |
Ran ran, honoured the contract we drafted |
hannamw/model-planning-public/a_an/evaluate_a_an.py code served (permissive licence) · get_code("7b0a327f0cbb50b6") 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 random
import pandas as pd
# Create a sample DataFrame with professions data
df = pd.DataFrame({
'article': ['a', 'an', 'a', 'an', 'a'],
'profession': ['engineer', 'architect', 'artist', 'astronomer', 'accountant']
})
# Create a random number generator with a seed for reproducibility
rng = random.Random(42)
# Define ARGS dictionary with all parameters for pick_filtered_in_context_index
ARGS = {
'cur_idx': 1,
'df': df,
'rng': rng,
'article_filter': 'a'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — 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
|
| pick_in_context_index |
Ran ran, honoured the contract we drafted |
hannamw/model-planning-public/a_an/evaluate_a_an.py code served (permissive licence) · get_code("766fdd7c6f816d0e") 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 random
def pick_in_context_index(cur_idx: int, num_rows: int, rng: random.Random) -> int:
"""Return an index different from cur_idx."""
idx = cur_idx
while idx == cur_idx:
idx = rng.randint(0, num_rows - 1)
return idx
ARGS = {
"cur_idx": 0,
"num_rows": 5,
"rng": random.Random(42)
}
- 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 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
|
| strip_think |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/couplets/local_planning_features.py code served (permissive licence) · get_code("0d0d2876aed050a4") 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 str. 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 re
def strip_think(text: str) -> str:
return re.sub('</think>\n\n', '', text, flags=re.DOTALL)
ARGS = {
'text': 'Some content\n</think>\n\nMore content after the tag'
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| term_in_logits |
Ran ran, violated the contract we drafted |
hannamw/model-planning-public/a_an/planning_node_intervention.py code served (permissive licence) · get_code("7908932bb26cd3a3") 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 re
def term_in_logits(term: str, top: list[str], bottom: list[str], use_bottom=True, substring_ok=True, k=10):
logits = top[:k] + bottom[:k] if use_bottom else top[:k]
logits = [re.sub('^[^\\w]+|[^\\w]+$', '', logit.strip()).lower() for logit in logits]
term = term.strip().lower()
if substring_ok:
len1 = 0
for logit in logits:
if logit == '' or logit == 'a' or logit == 'an':
continue
if term.startswith(logit):
if len(logit) == 1:
len1 += 1
if len1 >= 2:
return True
else:
return True
return False
else:
return any((term in logit for logit in logits))
ARGS = {
"term": "beautiful",
"top": ["beauty", "beautiful", "beautifully", "beautify", "beautified", "beautifies", "beauty's", "beauties", "beautiful's", "beautifier"],
"bottom": ["ugly", "ugliness", "pretty", "pretty's", "prettiness", "nice", "nicely", "niceness", "good", "goodness"],
"use_bottom": True,
"substring_ok": True,
"k": 10
}
- 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 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
|
| term_in_logits |
Ran ran, violated the contract we drafted |
hannamw/model-planning-public/couplets/local_planning_features.py code served (permissive licence) · get_code("53c1b20a18e3517a") 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 re
def term_in_logits(term: str, top: list[str], bottom: list[str], use_bottom=True, substring_ok=True, k=5):
logits = top[:k] + bottom[:k] if use_bottom else top[:k]
logits = [re.sub('^[^\\w]+|[^\\w]+$', '', logit.strip()).lower() for logit in logits]
term = term.strip().lower()
if substring_ok:
len1 = 0
for logit in logits:
if logit == '':
continue
if term.startswith(logit):
if len(logit) == 1:
len1 += 1
if len1 >= 2:
return True
else:
return True
return False
else:
return any((term in logit for logit in logits))
ARGS = {
"term": "hello world",
"top": ["hello", "world", "test", "example", "sample", "extra1", "extra2"],
"bottom": ["foo", "bar", "baz", "qux", "quux", "extra3", "extra4"],
"use_bottom": True,
"substring_ok": True,
"k": 5
}
- 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 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
|
| term_in_logits |
Ran ran, violated the contract we drafted |
hannamw/model-planning-public/el_la/planning_node_intervention.py code served (permissive licence) · get_code("0d69db4b28210314") 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 re
def term_in_logits(term: str, top: list[str], bottom: list[str], use_bottom=True, substring_ok=True, k=10):
logits = top[:k] + bottom[:k] if use_bottom else top[:k]
logits = [re.sub('^[^\\w]+|[^\\w]+$', '', logit.strip()).lower() for logit in logits]
term = term.strip().lower()
if substring_ok:
len1 = 0
for logit in logits:
if logit in {'', 'el', 'la', 'los', 'las', 'a', 'an'}:
continue
if term.startswith(logit):
if len(logit) <= 2:
len1 += 1
if len1 >= 2:
return True
else:
return True
return False
else:
return any((term in logit for logit in logits))
ARGS = {
"term": "testing",
"top": ["test", "testing", "tester", "tests", "tested", "TestCase", "testimony", "testament", "testify", "testable"],
"bottom": ["bottom1", "bottom2", "bottom3", "bottom4", "bottom5", "bottom6", "bottom7", "bottom8", "bottom9", "bottom10"],
"use_bottom": True,
"substring_ok": True,
"k": 5
}
- 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 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
|
| term_in_logits |
Ran ran, violated the contract we drafted |
hannamw/model-planning-public/is_are/planning_node_intervention.py code served (permissive licence) · get_code("7107312a9f379978") 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
import numpy as np
# Analyze the function:
# - term: str - search term
# - top: list[str] - list of strings (logits/tokens)
# - bottom: list[str] - list of strings (logits/tokens)
# - use_bottom: bool - whether to include bottom list
# - substring_ok: bool - whether to allow substring matching
# - k: int - number of items to take from each list
# The function manipulates these parameters as lists of strings,
# strips and lowercases them, and checks for matches.
# No complex objects needed.
ARGS = {
"term": "hello",
"top": ["world", "Python", "Test", "Hello", "Code", "Data", "Machine", "Learning"],
"bottom": ["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply"],
"use_bottom": True,
"substring_ok": False,
"k": 3
}
- 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 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
|
| train_probe |
Ran ran; our contract draft was wrong, not the code |
hannamw/model-planning-public/animal_stories/probing.py code served (permissive licence) · get_code("8674d9a18fef0cbd") 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 1, dtype family float; no output shape is stated. 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 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
import numpy as np
torch.manual_seed(0)
# Create small tensors for training and validation
# X_train: (batch_size=2, input_dim=4)
X_train = torch.randn(2, 4, dtype=torch.float32)
# y_train: (batch_size=2,) with class indices
y_train = torch.tensor([0, 1], dtype=torch.long)
# X_val: (batch_size=3, input_dim=4)
X_val = torch.randn(3, 4, dtype=torch.float32)
# y_val: (batch_size=3,) with class indices
y_val = torch.tensor([0, 1, 0], dtype=torch.long)
num_classes = 2
epochs = 10
lr = 0.001
ARGS = {
"X_train": X_train,
"y_train": y_train,
"X_val": X_val,
"y_val": y_val,
"num_classes": num_classes,
"epochs": epochs,
"lr": lr,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, 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
|
| extract_last_token_representations |
Not yet run unverified (harvested, no recorded run) |
hannamw/model-planning-public/animal_stories/probing.py code served (permissive licence) · get_code("04449161930fea6b") How it ran |
| get_features_top_acts_batch |
Not yet run unverified (harvested, no recorded run) |
hannamw/model-planning-public/a_an/load_feature_from_binary.py code served (permissive licence) · get_code("61b70730e382355d") How it ran |
| load_model |
Not yet run unverified (harvested, no recorded run) |
hannamw/model-planning-public/animal_stories/evaluate_animal_stories.py code served (permissive licence) · get_code("09fd84d63d8f2a44") How it ran |
| load_model_and_tokenizer |
Not yet run unverified (harvested, no recorded run) |
hannamw/model-planning-public/animal_stories/probing.py code served (permissive licence) · get_code("fcdffa1e12fc52ec") How it ran |
| predict_next_token |
Not yet run unverified (harvested, no recorded run) |
hannamw/model-planning-public/a_an/evaluate_a_an.py code served (permissive licence) · get_code("51a5e810aee900e6") How it ran |