Lexsi Hackathon T2b: Tiny Aya refusal steering (datasets)
Collection
Track 2b data: EN/HI/GU prompt sets, baseline and steered generations, metrics and the article. • 3 items • Updated
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
meta: struct<model: string, alpha: double, layer: int64, n_layers: int64, n_pairs: int64>
child 0, model: string
child 1, alpha: double
child 2, layer: int64
child 3, n_layers: int64
child 4, n_pairs: int64
slices: list<item: string>
child 0, item: string
state: struct<model: string, quant: string, max_new_tokens: int64, sets: list<item: string>, batch_size: in (... 138 chars omitted)
child 0, model: string
child 1, quant: string
child 2, max_new_tokens: int64
child 3, sets: list<item: string>
child 0, item: string
child 4, batch_size: int64
child 5, n_val: int64
child 6, pick_layer: null
child 7, degrades: list<item: null>
child 0, item: null
child 8, fallbacks: list<item: string>
child 0, item: string
child 9, alpha: double
child 10, generation_minutes: double
calibration: struct<model: string, layer: int64, n_layers: int64, layer_reason: string, sweep_fell_back_to_middle (... 1102 chars omitted)
child 0, model: string
child 1, layer: int64
child 2, n_layers: int64
child 3, layer_reason: string
child 4, sweep_fell_back_to_middle: bool
child 5, pick_layer: null
child 6, calibration_desc: string
child 7, n_harmful: int64
child 8, n_harmless: int64
child 9, n_val: int64
child 10, seconds: double
child 11, hidden_size: int64
child 12, resid_norm_last_token_by_layer: struct<0: double, 1: double, 2: double, 3: double, 4: double, 5: double, 6: double, 7: double, 8: do (... 328 chars omitted)
child
...
ild 16, 16: double
child 17, 17: double
child 18, 18: double
child 19, 19: double
child 20, 20: double
child 21, 21: double
child 22, 22: double
child 23, 23: double
child 24, 24: double
child 25, 25: double
child 26, 26: double
child 27, 27: double
child 28, 28: double
child 29, 29: double
child 30, 30: double
child 31, 31: double
child 32, 32: double
child 33, 33: double
child 34, 34: double
child 35, 35: double
layer: int64
cosine_of_layer_direction_to_picked: struct<0: double, 1: double, 2: double, 3: double, 4: double, 5: double, 6: double, 7: double, 8: do (... 328 chars omitted)
child 0, 0: double
child 1, 1: double
child 2, 2: double
child 3, 3: double
child 4, 4: double
child 5, 5: double
child 6, 6: double
child 7, 7: double
child 8, 8: double
child 9, 9: double
child 10, 10: double
child 11, 11: double
child 12, 12: double
child 13, 13: double
child 14, 14: double
child 15, 15: double
child 16, 16: double
child 17, 17: double
child 18, 18: double
child 19, 19: double
child 20, 20: double
child 21, 21: double
child 22, 22: double
child 23, 23: double
child 24, 24: double
child 25, 25: double
child 26, 26: double
child 27, 27: double
child 28, 28: double
child 29, 29: double
child 30, 30: double
child 31, 31: double
child 32, 32: double
child 33, 33: double
child 34, 34: double
child 35, 35: double
n_harmful: int64
model: string
n_harmless: int64
n_val: int64
to
{'model': Value('string'), 'layer': Value('int64'), 'n_layers': Value('int64'), 'layer_reason': Value('string'), 'sweep_fell_back_to_middle': Value('bool'), 'pick_layer': Value('null'), 'calibration_desc': Value('string'), 'n_harmful': Value('int64'), 'n_harmless': Value('int64'), 'n_val': Value('int64'), 'seconds': Value('float64'), 'hidden_size': Value('int64'), 'resid_norm_last_token_by_layer': {'0': Value('float64'), '1': Value('float64'), '2': Value('float64'), '3': Value('float64'), '4': Value('float64'), '5': Value('float64'), '6': Value('float64'), '7': Value('float64'), '8': Value('float64'), '9': Value('float64'), '10': Value('float64'), '11': Value('float64'), '12': Value('float64'), '13': Value('float64'), '14': Value('float64'), '15': Value('float64'), '16': Value('float64'), '17': Value('float64'), '18': Value('float64'), '19': Value('float64'), '20': Value('float64'), '21': Value('float64'), '22': Value('float64'), '23': Value('float64'), '24': Value('float64'), '25': Value('float64'), '26': Value('float64'), '27': Value('float64'), '28': Value('float64'), '29': Value('float64'), '30': Value('float64'), '31': Value('float64'), '32': Value('float64'), '33': Value('float64'), '34': Value('float64'), '35': Value('float64')}, 'cosine_of_layer_direction_to_picked': {'0': Value('float64'), '1': Value('float64'), '2': Value('float64'), '3': Value('float64'), '4': Value('float64'), '5': Value('float64'), '6': Value('float64'), '7': Value('float64'), '8': Value('float64'), '9': Value('float64'), '10': Value('float64'), '11': Value('float64'), '12': Value('float64'), '13': Value('float64'), '14': Value('float64'), '15': Value('float64'), '16': Value('float64'), '17': Value('float64'), '18': Value('float64'), '19': Value('float64'), '20': Value('float64'), '21': Value('float64'), '22': Value('float64'), '23': Value('float64'), '24': Value('float64'), '25': Value('float64'), '26': Value('float64'), '27': Value('float64'), '28': Value('float64'), '29': Value('float64'), '30': Value('float64'), '31': Value('float64'), '32': Value('float64'), '33': Value('float64'), '34': Value('float64'), '35': Value('float64')}, 'safetune_log': List(Value('string'))}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3052, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
meta: struct<model: string, alpha: double, layer: int64, n_layers: int64, n_pairs: int64>
child 0, model: string
child 1, alpha: double
child 2, layer: int64
child 3, n_layers: int64
child 4, n_pairs: int64
slices: list<item: string>
child 0, item: string
state: struct<model: string, quant: string, max_new_tokens: int64, sets: list<item: string>, batch_size: in (... 138 chars omitted)
child 0, model: string
child 1, quant: string
child 2, max_new_tokens: int64
child 3, sets: list<item: string>
child 0, item: string
child 4, batch_size: int64
child 5, n_val: int64
child 6, pick_layer: null
child 7, degrades: list<item: null>
child 0, item: null
child 8, fallbacks: list<item: string>
child 0, item: string
child 9, alpha: double
child 10, generation_minutes: double
calibration: struct<model: string, layer: int64, n_layers: int64, layer_reason: string, sweep_fell_back_to_middle (... 1102 chars omitted)
child 0, model: string
child 1, layer: int64
child 2, n_layers: int64
child 3, layer_reason: string
child 4, sweep_fell_back_to_middle: bool
child 5, pick_layer: null
child 6, calibration_desc: string
child 7, n_harmful: int64
child 8, n_harmless: int64
child 9, n_val: int64
child 10, seconds: double
child 11, hidden_size: int64
child 12, resid_norm_last_token_by_layer: struct<0: double, 1: double, 2: double, 3: double, 4: double, 5: double, 6: double, 7: double, 8: do (... 328 chars omitted)
child
...
ild 16, 16: double
child 17, 17: double
child 18, 18: double
child 19, 19: double
child 20, 20: double
child 21, 21: double
child 22, 22: double
child 23, 23: double
child 24, 24: double
child 25, 25: double
child 26, 26: double
child 27, 27: double
child 28, 28: double
child 29, 29: double
child 30, 30: double
child 31, 31: double
child 32, 32: double
child 33, 33: double
child 34, 34: double
child 35, 35: double
layer: int64
cosine_of_layer_direction_to_picked: struct<0: double, 1: double, 2: double, 3: double, 4: double, 5: double, 6: double, 7: double, 8: do (... 328 chars omitted)
child 0, 0: double
child 1, 1: double
child 2, 2: double
child 3, 3: double
child 4, 4: double
child 5, 5: double
child 6, 6: double
child 7, 7: double
child 8, 8: double
child 9, 9: double
child 10, 10: double
child 11, 11: double
child 12, 12: double
child 13, 13: double
child 14, 14: double
child 15, 15: double
child 16, 16: double
child 17, 17: double
child 18, 18: double
child 19, 19: double
child 20, 20: double
child 21, 21: double
child 22, 22: double
child 23, 23: double
child 24, 24: double
child 25, 25: double
child 26, 26: double
child 27, 27: double
child 28, 28: double
child 29, 29: double
child 30, 30: double
child 31, 31: double
child 32, 32: double
child 33, 33: double
child 34, 34: double
child 35, 35: double
n_harmful: int64
model: string
n_harmless: int64
n_val: int64
to
{'model': Value('string'), 'layer': Value('int64'), 'n_layers': Value('int64'), 'layer_reason': Value('string'), 'sweep_fell_back_to_middle': Value('bool'), 'pick_layer': Value('null'), 'calibration_desc': Value('string'), 'n_harmful': Value('int64'), 'n_harmless': Value('int64'), 'n_val': Value('int64'), 'seconds': Value('float64'), 'hidden_size': Value('int64'), 'resid_norm_last_token_by_layer': {'0': Value('float64'), '1': Value('float64'), '2': Value('float64'), '3': Value('float64'), '4': Value('float64'), '5': Value('float64'), '6': Value('float64'), '7': Value('float64'), '8': Value('float64'), '9': Value('float64'), '10': Value('float64'), '11': Value('float64'), '12': Value('float64'), '13': Value('float64'), '14': Value('float64'), '15': Value('float64'), '16': Value('float64'), '17': Value('float64'), '18': Value('float64'), '19': Value('float64'), '20': Value('float64'), '21': Value('float64'), '22': Value('float64'), '23': Value('float64'), '24': Value('float64'), '25': Value('float64'), '26': Value('float64'), '27': Value('float64'), '28': Value('float64'), '29': Value('float64'), '30': Value('float64'), '31': Value('float64'), '32': Value('float64'), '33': Value('float64'), '34': Value('float64'), '35': Value('float64')}, 'cosine_of_layer_direction_to_picked': {'0': Value('float64'), '1': Value('float64'), '2': Value('float64'), '3': Value('float64'), '4': Value('float64'), '5': Value('float64'), '6': Value('float64'), '7': Value('float64'), '8': Value('float64'), '9': Value('float64'), '10': Value('float64'), '11': Value('float64'), '12': Value('float64'), '13': Value('float64'), '14': Value('float64'), '15': Value('float64'), '16': Value('float64'), '17': Value('float64'), '18': Value('float64'), '19': Value('float64'), '20': Value('float64'), '21': Value('float64'), '22': Value('float64'), '23': Value('float64'), '24': Value('float64'), '25': Value('float64'), '26': Value('float64'), '27': Value('float64'), '28': Value('float64'), '29': Value('float64'), '30': Value('float64'), '31': Value('float64'), '32': Value('float64'), '33': Value('float64'), '34': Value('float64'), '35': Value('float64')}, 'safetune_log': List(Value('string'))}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
CohereLabs/tiny-aya-global: results
Lexsi AI Safety Hackathon, Track 2b. SafeTune extracts and adds the refusal direction at inference time (alpha = 0.8, direction from layer 16 of 36); AuditKIT scores baseline vs steered.
ARTICLE.md: the write-upmetrics.md / metrics.json: full before/after table, deltas, p-values, throughputcalibration.json, sweep.json, state.json, preflight.json, timing/, auditkit/compare_*.txtRelated repositories under the same account: prompts safety-prompts-en-hi-gu; raw baseline and steered model replies
tiny-aya-refusal-steering-generations (content warning: replies to harmful prompts); the steering vector tiny-aya-refusal-direction (model repo).
Code: https://github.com/kunjkansara01/tiny-aya-multilingual-steering