madiedgar commited on
Commit
d59f2d6
·
verified ·
1 Parent(s): f1a6796

docs: align card with published condition-5 configs (ur/zh/es)

Browse files

Aligns the dataset card with the published condition-5 data:

- Raw/pre-cleanup caveat note for the `condition-5-*` configs
- Config table: correct ur numbers (4,088/381), add zh (4,052/381) and es (4,032/329)
- New Condition 5 schema section (7 cols = conditions 1-2 + `idx`)
- Condition 5 row in the Experimental Conditions table
- Condition 5 entries in Dataset Description, Available Configs, Usage, Technical Details, and Limitations

Frontmatter and condition-1/2 configs untouched.

Files changed (1) hide show
  1. README.md +29 -3
README.md CHANGED
@@ -921,7 +921,7 @@ Prior work ([Aryabumi et al., 2024 -- "To Code or Not to Code"](https://arxiv.or
921
 
922
  ## Dataset Description
923
 
924
- This dataset provides filtered, quality-controlled Python source code in multiple configurations: the original English, three keyword-swapped variants (Chinese, Spanish, Urdu), a blended native+transpiled mix, and strictly native Chinese code. The source data is drawn from [bigcode/the-stack-dedup](https://huggingface.co/datasets/bigcode/the-stack-dedup) (Python subset), filtered for quality using the following criteria:
925
 
926
  - AST-valid Python only (must parse without errors)
927
  - Permissive licenses only (MIT, Apache-2.0, BSD, etc.)
@@ -934,7 +934,7 @@ Keyword-swapped variants are produced using [Legesher](https://github.com/legesh
934
 
935
  ## Available Configs
936
 
937
- Conditions 1--2 are available in three current Phase 3 sizes: `-103k` full corpora, `-20k` random subsets sampled from the corresponding `-103k` config with seed 42, and `-5k` compact subsets. Phase 2 `-32k` configs are still available with the `phase-2-the-stack-v1-*` prefix.
938
 
939
  | Config | Condition | Language | Description | Train | Val |
940
  | ------------------------- | ----------- | -------- | ------------------------------------------------ | ------ | ------ |
@@ -952,7 +952,9 @@ Conditions 1--2 are available in three current Phase 3 sizes: `-103k` full corpo
952
  | `condition-2-ur-5k` | 2 | Urdu | Compact 5k subset | 4,500 | 500 |
953
  | `condition-3-zh-5k` | 3 | Chinese | Blended: native Chinese code + transpiled Python | 4,500 | 500 |
954
  | `condition-4-zh-5k` | 4 | Chinese | Strictly native Chinese code | 6,553 | 729 |
955
- | `condition-5-ur-5k-c4ai-aya-expanse-32b` | 5 | Urdu | Model-translated Urdu condition | 4,024 | 447 |
 
 
956
 
957
  ## Schema
958
 
@@ -969,6 +971,22 @@ Used by: `condition-1-en-*`, `condition-2-zh-*`, `condition-2-es-*`, `condition-
969
  | `license` | string | SPDX license identifier for the source file. |
970
  | `token_count` | int64 | Token count computed using the CohereLabs/tiny-aya-base tokenizer. |
971
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
972
  ### Condition 3
973
 
974
  Used by: `condition-3-zh-5k`
@@ -1015,6 +1033,7 @@ The Language Decoded experiment uses a ladder of conditions to isolate the mecha
1015
  | Condition 2 | Keyword-swapped code | Tests whether the _language_ of keywords matters for the reasoning benefit |
1016
  | Condition 3 | Mixed native sources | Tests whether diverse native-language code adds value beyond keyword swapping |
1017
  | Condition 4 | Strictly native code | Tests whether code authored by native speakers carries unique signal beyond transpilation |
 
1018
 
1019
  ### The Experimental Ladder
1020
 
@@ -1051,6 +1070,11 @@ ds = load_dataset("legesher/language-decoded-data", "condition-3-zh-5k")
1051
  # Load strictly native code (condition 4)
1052
  ds = load_dataset("legesher/language-decoded-data", "condition-4-zh-5k")
1053
 
 
 
 
 
 
1054
  # Access splits
1055
  train = ds["train"]
1056
  val = ds["validation"]
@@ -1067,6 +1091,7 @@ native_only = train.filter(lambda x: x["source_type"] == "native")
1067
  | Transpilation tool | [Legesher](https://github.com/legesher/legesher) v0.7.3 (legesher-core, legesher-i18n) |
1068
  | Tokenizer | CohereLabs/tiny-aya-base |
1069
  | Base model | [CohereLabs/tiny-aya-base](https://huggingface.co/CohereLabs/tiny-aya-base) (3.35B params) |
 
1070
  | Train/validation split | 90% / 10% (seed 42) |
1071
  | File format | Parquet (snappy compression) |
1072
  | Filtering criteria | AST-valid, permissive licenses, 10--1000 lines, min 21 GitHub stars, no autogenerated files, SHA-256 deduplication |
@@ -1078,6 +1103,7 @@ native_only = train.filter(lambda x: x["source_type"] == "native")
1078
  - **Token count variation**: Transpiled code may have different token counts than the English original due to multi-byte characters (especially for Chinese and Urdu), even though the code structure is identical.
1079
  - **Single programming language**: Currently limited to Python. Results may not generalize to other programming languages.
1080
  - **Condition 4 scope**: Native Chinese code is limited to publicly available sources (The Stack, Wenyan, Program-in-Chinese, Qi, Mulan) and may not represent the full spectrum of Chinese-language programming.
 
1081
 
1082
  ## Citation
1083
 
 
921
 
922
  ## Dataset Description
923
 
924
+ This dataset provides filtered, quality-controlled Python source code in multiple configurations: the original English, three keyword-swapped variants (Chinese, Spanish, Urdu), a blended native+transpiled mix, strictly native Chinese code, and a model-translated set in which an LLM translates the full source (identifiers, strings, and comments, not just keywords). The source data is drawn from [bigcode/the-stack-dedup](https://huggingface.co/datasets/bigcode/the-stack-dedup) (Python subset), filtered for quality using the following criteria:
925
 
926
  - AST-valid Python only (must parse without errors)
927
  - Permissive licenses only (MIT, Apache-2.0, BSD, etc.)
 
934
 
935
  ## Available Configs
936
 
937
+ Conditions 1--2 are available in three current Phase 3 sizes: `-103k` full corpora, `-20k` random subsets sampled from the corresponding `-103k` config with seed 42, and `-5k` compact subsets. Phase 2 `-32k` configs are still available with the `phase-2-the-stack-v1-*` prefix. Condition 5 (`condition-5-*-c4ai-aya-expanse-32b`) is the model-translated set — currently `5k` only, and raw/pre-cleanup (see the note above).
938
 
939
  | Config | Condition | Language | Description | Train | Val |
940
  | ------------------------- | ----------- | -------- | ------------------------------------------------ | ------ | ------ |
 
952
  | `condition-2-ur-5k` | 2 | Urdu | Compact 5k subset | 4,500 | 500 |
953
  | `condition-3-zh-5k` | 3 | Chinese | Blended: native Chinese code + transpiled Python | 4,500 | 500 |
954
  | `condition-4-zh-5k` | 4 | Chinese | Strictly native Chinese code | 6,553 | 729 |
955
+ | `condition-5-ur-5k-c4ai-aya-expanse-32b` | 5 | Urdu | Model-translated (full LLM translation via Cohere Aya) — raw, pre-cleanup | 4,088 | 381 |
956
+ | `condition-5-zh-5k-c4ai-aya-expanse-32b` | 5 | Chinese | Model-translated (full LLM translation via Cohere Aya) — raw, pre-cleanup | 4,052 | 381 |
957
+ | `condition-5-es-5k-c4ai-aya-expanse-32b` | 5 | Spanish | Model-translated (full LLM translation via Cohere Aya) — raw, pre-cleanup | 4,032 | 329 |
958
 
959
  ## Schema
960
 
 
971
  | `license` | string | SPDX license identifier for the source file. |
972
  | `token_count` | int64 | Token count computed using the CohereLabs/tiny-aya-base tokenizer. |
973
 
974
+ ### Condition 5
975
+
976
+ Used by: `condition-5-ur-5k-c4ai-aya-expanse-32b`, `condition-5-zh-5k-c4ai-aya-expanse-32b`, `condition-5-es-5k-c4ai-aya-expanse-32b`
977
+
978
+ Condition 5 uses the conditions 1--2 schema plus an `idx` column. `code` is the full LLM-translated source (identifiers, strings, comments, and keywords); `code_en` is the English original. These configs are raw model output — see the note at the top of this card.
979
+
980
+ | Column | Type | Description |
981
+ | ------------- | ------ | ------------------------------------------------------------------------------------- |
982
+ | `code` | string | Model-translated Python source (full LLM translation via Cohere Aya). |
983
+ | `code_en` | string | Original English Python source code. |
984
+ | `language` | string | ISO 639-1 language code: `ur`, `zh`, or `es`. |
985
+ | `file_path` | string | Original file path in The Stack Dedup. |
986
+ | `license` | string | SPDX license identifier for the source file. |
987
+ | `idx` | int64 | Source row index into `condition-1-en-5k`. Enables row-level joins across conditions. |
988
+ | `token_count` | int64 | Token count computed using the CohereLabs/tiny-aya-base tokenizer. |
989
+
990
  ### Condition 3
991
 
992
  Used by: `condition-3-zh-5k`
 
1033
  | Condition 2 | Keyword-swapped code | Tests whether the _language_ of keywords matters for the reasoning benefit |
1034
  | Condition 3 | Mixed native sources | Tests whether diverse native-language code adds value beyond keyword swapping |
1035
  | Condition 4 | Strictly native code | Tests whether code authored by native speakers carries unique signal beyond transpilation |
1036
+ | Condition 5 | Model-translated code | Tests whether full LLM translation (identifiers, strings, comments -- not just keywords) changes the reasoning benefit, relative to Condition 2's keyword-only swap |
1037
 
1038
  ### The Experimental Ladder
1039
 
 
1070
  # Load strictly native code (condition 4)
1071
  ds = load_dataset("legesher/language-decoded-data", "condition-4-zh-5k")
1072
 
1073
+ # Load model-translated code (condition 5 -- raw, pre-cleanup)
1074
+ ds = load_dataset("legesher/language-decoded-data", "condition-5-ur-5k-c4ai-aya-expanse-32b")
1075
+ ds = load_dataset("legesher/language-decoded-data", "condition-5-zh-5k-c4ai-aya-expanse-32b")
1076
+ ds = load_dataset("legesher/language-decoded-data", "condition-5-es-5k-c4ai-aya-expanse-32b")
1077
+
1078
  # Access splits
1079
  train = ds["train"]
1080
  val = ds["validation"]
 
1091
  | Transpilation tool | [Legesher](https://github.com/legesher/legesher) v0.7.3 (legesher-core, legesher-i18n) |
1092
  | Tokenizer | CohereLabs/tiny-aya-base |
1093
  | Base model | [CohereLabs/tiny-aya-base](https://huggingface.co/CohereLabs/tiny-aya-base) (3.35B params) |
1094
+ | Condition 5 translation model | Cohere `c4ai-aya-expanse-32b` (Aya Expanse 32B, via the Cohere API) |
1095
  | Train/validation split | 90% / 10% (seed 42) |
1096
  | File format | Parquet (snappy compression) |
1097
  | Filtering criteria | AST-valid, permissive licenses, 10--1000 lines, min 21 GitHub stars, no autogenerated files, SHA-256 deduplication |
 
1103
  - **Token count variation**: Transpiled code may have different token counts than the English original due to multi-byte characters (especially for Chinese and Urdu), even though the code structure is identical.
1104
  - **Single programming language**: Currently limited to Python. Results may not generalize to other programming languages.
1105
  - **Condition 4 scope**: Native Chinese code is limited to publicly available sources (The Stack, Wenyan, Program-in-Chinese, Qi, Mulan) and may not represent the full spectrum of Chinese-language programming.
1106
+ - **Condition 5 is raw model output**: The `condition-5-*` configs contain prompt-leakage contamination -- translator-model preamble text, JSON wrappers, and explanation commentary leaked into string literals and identifier names, in AST-valid and AST-invalid rows alike. Cleaned configs will be published separately. See the note at the top of this card.
1107
 
1108
  ## Citation
1109