| add_time_signal |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/timing.py code served (permissive licence) · get_code("8262962c9096134b") 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 EagerTensor, 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 tensorflow as tf
import math
# Set seeds for reproducibility
tf.random.set_seed(0)
# Create small test tensors
batch_size = 2
sequence_length = 3
feature_dim = 4 # Must be even for the function
# Create input tensor BxIxD
inputs_BxIxD = tf.random.normal((batch_size, sequence_length, feature_dim), dtype=tf.float32)
# Create start_index tensor [batch_size] - optional parameter
start_index = tf.constant([[0], [1]], dtype=tf.int32)
ARGS = {
"inputs_BxIxD": inputs_BxIxD,
"start_index": start_index,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, 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
|
| beam_search |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/beam_search.py code served (permissive licence) · get_code("f57d0063335e8a9b") 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 tensorflow as tf
def symbols_to_logits_fn(seq_BxT, cache_BxU, i):
"""Mock function that returns logits and updated cache."""
# seq_BxT has shape [batch*beam, seq_len]
# cache_BxU is a dict with tensors of shape [batch*beam, ...]
B_flat = tf.shape(seq_BxT)[0]
logits_BMxV = tf.random.normal([B_flat, 5], dtype=tf.float32) # vocab_size=5
cache_out = tf.nest.map_structure(lambda t: t, cache_BxU)
return logits_BMxV, cache_out
def length_norm_fn(log_probs, length):
"""Mock length normalization function."""
# Normalize by length
return log_probs / tf.cast(length, tf.float32)
# Setup parameters
tf.random.set_seed(0)
batch_size = 2
seq_len = 4
vocab_size = 5
beam_size = 3
eos_id = 1
# Create initial sequence (batch_size x seq_len)
init_seq_BxT = tf.constant([[0, 0, 0, 0], [0, 0, 0, 0]], dtype=tf.int32)
# Create initial cache as a dictionary of tensors (batch_size x cache_dim)
initial_cache_BxU = {
"cache_1": tf.random.normal([batch_size, 6], dtype=tf.float32),
"cache_2": tf.random.normal([batch_size, 7], dtype=tf.float32),
}
ARGS = {
"symbols_to_logits_fn": symbols_to_logits_fn,
"init_seq_BxT": init_seq_BxT,
"initial_cache_BxU": initial_cache_BxU,
"vocab_size": vocab_size,
"beam_size": beam_size,
"length_norm_fn": length_norm_fn,
"eos_id": eos_id,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — 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
|
| beam_search |
Ran ran on a synthesized input |
amiyamandal-dev/pegasus/pegasus/layers/beam_search.py code served (permissive licence) · get_code("e631e67cdf964175") 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 tensorflow as tf
import numpy as np
# Set up small dimensions for testing
B = 2 # batch size
T = 3 # sequence length
M = 2 # beam size
V = 5 # vocab size
U = 4 # cache embedding dimension
# Create initial sequence (B x T)
init_seq_BxT = tf.constant([[1, 0, 0], [2, 0, 0]], dtype=tf.int32)
# Create initial cache (B x U) - dictionary of tensors
initial_cache_BxU = {
'cache_1': tf.random.normal([B, U], dtype=tf.float32),
'cache_2': tf.random.normal([B, U], dtype=tf.float32),
}
# Define symbols_to_logits_fn
# It takes (seq_BMxT, cache_BMxU, i) and returns (logits_BMxV, cache_BMxU)
def symbols_to_logits_fn(seq, cache, i):
# seq shape: (B*M, T)
# cache: dict of tensors with shape (B*M, U)
# return: logits (B*M, V) and updated cache
BM = tf.shape(seq)[0]
logits = tf.random.normal([BM, V], dtype=tf.float32)
updated_cache = tf.nest.map_structure(
lambda t: t + 0.01 * tf.cast(i, tf.float32),
cache
)
return logits, updated_cache
# Length normalization function
def length_norm_fn(log_probs, length):
# log_probs shape: (B, 2*M) or similar
# Apply length normalization: divide by length^alpha
alpha = 0.6
return log_probs / tf.cast(length, tf.float32) ** alpha
vocab_size = V
beam_size = M
eos_id = 1
ARGS = {
'symbols_to_logits_fn': symbols_to_logits_fn,
'init_seq_BxT': init_seq_BxT,
'initial_cache_BxU': initial_cache_BxU,
'vocab_size': vocab_size,
'beam_size': beam_size,
'length_norm_fn': length_norm_fn,
'eos_id': eos_id,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| gen_eval_metrics_fn |
Ran ran on a synthesized input |
ManuMahadevaswamy/PEGASUS/pegasus/eval/estimator_metrics.py code served (permissive licence) · get_code("6d538a3d4787a4da") 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 tensorflow as tf
import numpy as np
# Set seed for reproducibility
tf.random.set_seed(0)
# Create small test tensors
batch_size = 2
seq_len = 3
vocab_size = 4
# Create features dict with targets and optional targets_mask
features = {
'targets': tf.constant([[1, 2, 0], [3, 1, 2]], dtype=tf.int64), # [batch_size, seq_len]
'targets_mask': tf.constant([[1.0, 1.0, 0.0], [1.0, 1.0, 1.0]], dtype=tf.float32) # [batch_size, seq_len]
}
# Create outputs dict with logits
outputs = {
'logits': tf.random.normal([batch_size, seq_len, vocab_size], dtype=tf.float32) # [batch_size, seq_len, vocab_size]
}
ARGS = {
'features': features,
'outputs': outputs
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| gen_eval_metrics_fn |
Ran ran on a synthesized input |
amiyamandal-dev/pegasus/pegasus/eval/estimator_metrics.py code served (permissive licence) · get_code("dda63a05e27da59c") 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 tensorflow as tf
import numpy as np
# Create small test tensors
batch_size = 2
seq_len = 4
vocab_size = 3
# Create features dict with targets and targets_mask
features = {
'targets': tf.constant([[1, 2, 0, 1], [2, 1, 0, 2]], dtype=tf.int32), # [batch_size, seq_len]
'targets_mask': tf.constant([[1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 1.0]], dtype=tf.float32) # [batch_size, seq_len]
}
# Create outputs dict with logits
outputs = {
'logits': tf.random.normal([batch_size, seq_len, vocab_size]) # [batch_size, seq_len, vocab_size]
}
ARGS = {
'features': features,
'outputs': outputs
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| ids2str |
Ran ran on a synthesized input |
rsin46/pegasus-demo/text_eval.py code served (permissive licence) · get_code("b5de54fd00a4cd5d") 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 numpy as np
class MockEncoder:
"""Mock encoder that implements the decode method."""
def decode(self, ids_list):
"""Convert list of ids to string."""
return ''.join([chr(97 + i % 26) for i in ids_list])
# Create encoder instance
encoder = MockEncoder()
# Create ids array with some reserved tokens and regular tokens
# Using values: 0, 1 (reserved), 2-5 (regular), then end marker
ids = np.array([2, 3, 4, 1, 5, 6], dtype=np.int32)
# Number of reserved tokens (0 and 1 are reserved)
num_reserved = 2
ARGS = {
'encoder': encoder,
'ids': ids,
'num_reserved': num_reserved
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — 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
|
| ids_to_bias |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/attention.py code served (permissive licence) · get_code("d527671852cb1888") 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 EagerTensor, ndim 3, dtype family float, shape (2, 1, 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 tensorflow as tf
# Create a small batch of token ids
# Shape: (B=2, I=4) where B is batch size and I is sequence length
ids_BxI = tf.constant([
[1, 2, 3, 0], # batch 0: has padding id (0) at position 3
[5, 0, 6, 7], # batch 1: has padding id (0) at position 1
], dtype=tf.int32)
# Define ARGS dict with all parameters
ARGS = {
"ids_BxI": ids_BxI,
"dtype": tf.float32,
"padding_id": 0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, ndim 3, dtype family float, shape (2, 1, 4) — shape (2, 1, 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
|
| inplace_update_i |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/decoding.py code served (permissive licence) · get_code("dbfe95961072cf4f") 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 EagerTensor, ndim 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np
# Create a small tensor of shape (batch_size=2, length=4)
tensor_BxL = tf.constant([[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
# Create updates for batch size 2
updates_B = tf.constant([99.0, 88.0], dtype=tf.float32)
# Index position to update
i = 2
ARGS = {
"tensor_BxL": tensor_BxL,
"updates_B": updates_B,
"i": i
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
|
| length_normalization |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/beam_search.py code served (permissive licence) · get_code("3e4b71dc7e938e80") 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 tensorflow as tf
import numpy as np
ARGS = {
"start": 5,
"alpha": 0.6,
"min_len": 2,
"max_len": 10,
"out_of_range_penalty": -1.0
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| length_normalization |
Ran ran on a synthesized input |
amiyamandal-dev/pegasus/pegasus/layers/beam_search.py code served (permissive licence) · get_code("26a1c4bbb2c2b25a") 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 tensorflow as tf
import numpy as np
# Set random seeds for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# Define arguments for length_normalization function
ARGS = {
"start": 5,
"alpha": 0.6,
"min_len": 2,
"max_len": 20,
"out_of_range_penalty": -1.0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| parse_json_line |
Ran ran; our contract draft was wrong, not the code |
google-research/longt5/longt5/data/nq_preprocess.py code served (permissive licence) · get_code("3df820a3fa7f5f80") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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
# The function parse_json_line takes a single parameter 'line' which should be a string
# containing valid JSON that can be parsed by json.loads()
line = '{"key": "value", "number": 42, "list": [1, 2, 3], "nested": {"inner": "data"}}'
ARGS = {
"line": line
}
- Setup block drafted by
- a language model, Claude Sonnet 4.5, prompt python_fixture_v1
- 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
|
| pretrain_eval_metrics_fn |
Ran ran on a synthesized input |
ManuMahadevaswamy/PEGASUS/pegasus/eval/estimator_metrics.py code served (permissive licence) · get_code("090d5328998234ab") 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 tensorflow as tf
import numpy as np
# Set random seed for reproducibility
tf.random.set_seed(0)
# Define small tensors matching the expected shapes
batch_size = 2
seq_len = 4
vocab_size = 3
# Create labels tensor [batch_size, seq_len]
labels = tf.constant([
[1, 2, 0, 1],
[2, 1, 0, 2]
], dtype=tf.int64)
# Create targets tensor [batch_size, seq_len]
targets = tf.constant([
[1, 2, 0, 1],
[2, 1, 0, 2]
], dtype=tf.int64)
# Create masked_inputs tensor [batch_size, seq_len]
masked_inputs = tf.constant([
[1, 0, 2, 1],
[0, 2, 1, 0]
], dtype=tf.int64)
# Create weights tensor [batch_size, seq_len]
weights = tf.constant([
[1.0, 1.0, 0.0, 1.0],
[1.0, 1.0, 0.0, 1.0]
], dtype=tf.float32)
# Create masked_inputs_weights tensor [batch_size, seq_len]
masked_inputs_weights = tf.constant([
[1.0, 0.0, 1.0, 1.0],
[0.0, 1.0, 1.0, 0.0]
], dtype=tf.float32)
# Create logits tensor [batch_size, seq_len, vocab_size]
logits = tf.constant([
[[1.0, 2.0, 0.5], [0.5, 1.5, 2.0], [2.0, 0.5, 1.0], [1.5, 2.0, 0.5]],
[[2.0, 0.5, 1.0], [1.0, 2.0, 0.5], [0.5, 1.5, 2.0], [2.0, 0.5, 1.0]]
], dtype=tf.float32)
# Create logits_mlm tensor [batch_size, seq_len, vocab_size]
logits_mlm = tf.constant([
[[0.5, 1.5, 2.0], [2.0, 0.5, 1.0], [1.0, 2.0, 0.5], [0.5, 1.5, 2.0]],
[[1.5, 2.0, 0.5], [0.5, 1.5, 2.0], [2.0, 0.5, 1.0], [1.0, 2.0, 0.5]]
], dtype=tf.float32)
# Create features dictionary
features = {
'targets': targets,
'targets_mask': weights,
'masked_inputs': masked_inputs,
'masked_inputs_mask': masked_inputs_weights
}
# Create outputs dictionary with both logits and logits_mlm
outputs = {
'logits': logits,
'logits_mlm': logits_mlm
}
ARGS = {
'features': features,
'outputs': outputs
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| pretrain_eval_metrics_fn |
Ran ran on a synthesized input |
amiyamandal-dev/pegasus/pegasus/eval/estimator_metrics.py code served (permissive licence) · get_code("72dda61812887b15") 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 tensorflow as tf
import numpy as np
# Set seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)
# Define tensor dimensions
batch_size = 2
seq_len = 4
vocab_size = 5
# Create sample tensors
targets = tf.constant([[1, 2, 0, 3], [2, 1, 0, 1]], dtype=tf.int64)
targets_mask = tf.constant([[1.0, 1.0, 0.0, 1.0], [1.0, 1.0, 0.0, 1.0]], dtype=tf.float32)
masked_inputs = tf.constant([[1, 0, 2, 3], [0, 1, 2, 1]], dtype=tf.int64)
masked_inputs_mask = tf.constant([[1.0, 0.0, 1.0, 1.0], [0.0, 1.0, 1.0, 1.0]], dtype=tf.float32)
logits = tf.random.normal([batch_size, seq_len, vocab_size])
logits_mlm = tf.random.normal([batch_size, seq_len, vocab_size])
# Create features dict
features = {
'targets': targets,
'targets_mask': targets_mask,
'masked_inputs': masked_inputs,
'masked_inputs_mask': masked_inputs_mask,
}
# Create outputs dict
outputs = {
'logits': logits,
'logits_mlm': logits_mlm,
}
ARGS = {
'features': features,
'outputs': outputs,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — 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
|
| process_logits |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/decoding.py code served (permissive licence) · get_code("748964a1602cc57e") 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 EagerTensor, ndim 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np
# Create a small batch of logits
# Shape: [batch_size=2, vocab_size=4]
logits_BxN = tf.constant([
[1.0, 2.0, 3.0, 0.5],
[0.2, 1.5, 2.5, 1.0]
], dtype=tf.float32)
ARGS = {
"logits_BxN": logits_BxN,
"top_k": 0,
"top_p": 0.0,
"temperature": 0.0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
|
| process_logits |
Ran ran on a synthesized input |
amiyamandal-dev/pegasus/pegasus/layers/decoding.py code served (permissive licence) · get_code("b093c178891eb13c") 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 EagerTensor, 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 tensorflow as tf
import numpy as np
# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# Create small test logits tensor: [batch_size=2, vocab_size=4]
logits_BxN = tf.constant([
[1.0, 2.0, 3.0, 0.5],
[0.5, 1.5, 2.5, 1.0]
], dtype=tf.float32)
ARGS = {
"logits_BxN": logits_BxN,
"top_k": 0,
"top_p": 0.0,
"temperature": 0.0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor 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
|
| split_heads |
Ran ran on a synthesized input |
google-research/pegasus/pegasus/layers/attention.py code served (permissive licence) · get_code("7eb8334d0e01c2d2") 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 EagerTensor, ndim 4, 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 tensorflow as tf
# Create a small tensor with shape [B, I, D]
# B=2 (batch), I=3 (sequence length), D=8 (embedding dimension)
tensor_BxIxD = tf.constant([
[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0],
[9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0],
[17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0]],
[[25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0],
[33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0],
[41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0]]
], dtype=tf.float32)
num_heads = 2
ARGS = {
"tensor_BxIxD": tensor_BxIxD,
"num_heads": num_heads
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor ndim 4, 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
|
| add_time_signal |
Not yet run unverified (harvested, no recorded run) |
amiyamandal-dev/pegasus/pegasus/layers/timing.py code served (permissive licence) · get_code("1137df4f4d6c95ea") How it ran |
| stack |
Not yet run unverified (harvested, no recorded run) |
google-research/pegasus/pegasus/layers/transformer_block.py code served (permissive licence) · get_code("b6ddfdc46c091f09") How it ran |
| upper_triangle_bias |
Not yet run unverified (harvested, no recorded run) |
google-research/pegasus/pegasus/layers/attention.py code served (permissive licence) · get_code("1d9052e8189c8d31") How it ran |