Dataset Viewer
Auto-converted to Parquet Duplicate
metadata
dict
results
list
{ "model_id": "Qwen/Qwen2.5-1.5B-Instruct", "evaluation_date": "2026-10-21T00:00:00", "temperature": 0, "max_new_tokens": 256, "total_samples": 10, "summary": { "english_accuracy_pass_at_1": 0.8, "gujlish_accuracy_pass_at_1": 0.3, "mean_tokenization_tax_ratio": 1.154, "cross_lingual_collisio...
[ { "test_id": 1, "category": "rate_and_distance", "target_answer": "210", "english": { "prompt": "A train travels at 60 km/h. How much distance will it cover in 3.5 hours? Think step by step.", "input_token_count": 48, "model_output": "To determine the distance covered by the train,...

Gujlish-Reasoning-Eval: Evaluating Code-Switched Reasoning Collapse in Small Frontier Models

Language Task Focus Target Models License

Author: Jay Prajapati


1. Abstract

Standard mathematical and reasoning benchmarks (such as GSM8K, SVAMP, and MATH) evaluate large language models exclusively in formal, standardized languages—predominantly English or formal native scripts (e.g., Devanagari or Gujarati Unicode). However, across Low- and Middle-Income Countries (LMICs), over a billion daily digital communications occur in Romanized code-switched vernaculars (e.g., "Gujlish" — a hybrid of Gujarati spoken phonetics written in Latin script and mixed with English loanwords).

This repository presents Gujlish-Reasoning-Eval (v1.0), an open diagnostic benchmark designed to investigate why and how mathematical Chain-of-Thought (CoT) reasoning collapses in sub-6B parameter frontier models when prompted in Romanized vernaculars. Evaluated on Qwen/Qwen2.5-1.5B-Instruct, our findings reveal two severe failure modes:

  1. The Tokenization Tax: Latin transliteration of Indic phonetics forces Byte-Pair Encoding (BPE) tokenizers to fracture single words into high-frequency byte fallbacks and meaningless morphemic shards, inflating input token length and exhausting latent attention capacity.
  2. Cross-Lingual Token Collision: Phonetically transliterated words collide with high-frequency English dictionary words. For example, the Romanized Gujarati auxiliary modal verb "shake" (શકે, meaning "can" or "able to") directly collides with the English token for physical vibration, causing the model's intermediate reasoning trajectory to completely derail.

2. Key Findings & Quantitative Results

Under identical greedy decoding parameters (temperature=0.0, max_new_tokens=256), we evaluated Qwen/Qwen2.5-1.5B-Instruct across 10 paired reasoning test cases spanning rate problems, fractions, multi-step arithmetic, percentages, and invariant logic.

Metric English Baseline Gujlish Probe Delta ($\Delta$)
Pass@1 Accuracy 80.0% (8/10) 30.0% (3/10) -50.0% absolute collapse
Mean Input Tokens 50.8 tokens 57.4 tokens +13.0% mean inflation
Peak Token Inflation — — +28.8% (Test ID 7)
Cross-Lingual Collisions 0% 30.0% of cases Severe semantic hijacking

3. Deep-Dive Case Studies

Case Study 1: The "Shake" Token Collision (Test ID 10)

  • Problem Type: Invariant Rate Logic (Cats and Mice)
  • Ground Truth Answer: 3 minutes

Prompt Comparison:

  • English Prompt: "If 3 cats can catch 3 mice in 3 minutes, how many minutes will it take 100 cats to catch 100 mice?"
  • Gujlish Prompt: "Jo 3 biladi 3 minute ma 3 undar pakdi shake, toh 100 biladi ne 100 undar pakadva ma ketli minute lagse?"

Mechanistic Failure Analysis:

In Gujarati, the phrase "pakdi shake" means "can catch" (where pakdi = catch, and shake / શકે = can / able to).

When fed to Qwen/Qwen2.5-1.5B-Instruct, the tokenizer maps the Romanized string "shake" directly to the high-resource English embedding vector representing physical agitation. Rather than executing mathematical rate analysis, the model's attention heads are hijacked by English lexical associations:

Actual Model Output (Qwen2.5-1.5B-Instruct):

Jo 3 biladi 3 minute ma 3 undar pakdi shake, toh 100 biladi ne 100 undar pakadva ma ketli minute lagse.

Explanation:
This is an interesting question that involves understanding the concept of "shake" in terms of time and effort. Let's break it down:
1. In the first part, we have 3 minutes for 3 shakes.
2. We need to find out how long it takes for 100 shakes.
To solve this, let's assume each shake takes some amount of time (let's call it T) and there are N shakes per minute.
For 3 shakes: Time taken = 3T...

The mathematical problem was completely overwritten by an imaginary physical vibration problem because the subword tokenizer lacks cross-lingual disambiguation for low-resource romanizations.


Case Study 2: Fractional Partitioning Distortion (Test ID 7)

  • Problem: "Box ma apekho ardho pizza bacho che. Jo 4 friends a bachelo pizza sarkha bhage share kare, toh darek ne aakha pizza no ketlo bhag malse?"
  • English Meaning: "Half of a large pizza is left in the box. If 4 friends share the remaining pizza equally, what fraction of the whole pizza does each friend get?"
  • Ground Truth: $\frac{1}{2} \div 4 = \frac{1}{8}$ (0.125).
  • English Output: Correctly identifies $\frac{1}{2} \div 4 = \frac{1}{8}$.
  • Gujlish Output: Outputs $\frac{1}{4}$ (0.25).
  • Diagnosis: The model completely loses the semantic constraint of the subword fragmented adjective "ardho" (half), treating the problem as sharing a whole pizza among 4 friends.

Case Study 3: Age Algebra & Hallucination (Test ID 8)

  • Problem: "5 varsh pachi, John ni age teni 10 varsh pela ni age karta double hase. John ni atyarni age ketli che?"
  • Ground Truth: $J + 5 = 2(J - 10) \implies J = 25\text{ years}$.
  • English Output: Correctly establishes the equation $J + 5 = 2 \times (J - 10)$ and solves for $25$.
  • Gujlish Output:

    "John ni atyarni age ketli che 20 varsh... 10 varsh + 20 varsh = 30 varsh. Therefore, John ni atyarni age ketli che 30 varsh."

  • Diagnosis: Complete breakdown of the symbolic algebraic mapping into naive additive hallucinations.

4. Proposed Solution: Mixed-Language Curriculum Distillation

To bridge this reasoning divide without inflating parameter counts, we propose:

[User Input: Romanized Vernacular (Gujlish)]
                      │
                      ▼
        [Latent Code-Switch Translator]
                      │
                      ▼
[Latent Chain-of-Thought Enforced in English Token Density]
         (Optimal token compression & high-density reasoning)
                      │
                      ▼
[Output Projection: Synthesized in User Vernacular (Gujlish)]

By forcing the model's intermediate Chain-of-Thought (latent reasoning) to execute in English (where BPE compression is maximal and semantic graphs are dense), and only translating the final response back into vernacular phrasing, models under 6B parameters can circumvent both the Tokenization Tax and Cross-Lingual Token Collision.


5. Repository Structure

Gujlish-Reasoning-Eval/
├── data/
│   ├── raw/
│   │   └── benchmark_v1.json         # Raw benchmark (10 paired questions with target answers)
│   └── results/
│       └── qwen_1.5b_eval_results.json # Full evaluation traces and diagnostic annotations
│
├── scripts/
│   ├── __init__.py                   # Package exports
│   ├── data_loader.py                # Schema validation & dataset loading utilities
│   ├── metrics.py                    # Tokenization tax, fertility, & regex answer parsing
│   └── evaluate.py                   # CLI inference & benchmark execution harness
│
├── notebooks/
│   └── exploratory_data_analysis.ipynb # Interactive visualizations & case-study traces
│
├── .gitignore
├── requirements.txt
├── LICENSE                           # MIT License
└── README.md                         # Academic documentation & Hugging Face Dataset Card

6. Quickstart & Usage

1. Installation

Clone this repository and install the minimal dependencies:

git clone https://huggingface.co/datasets/jay2219/Gujlish-Reasoning-Eval
cd Gujlish-Reasoning-Eval
pip install -r requirements.txt

2. Inspecting the Dataset Programmatically

from scripts.data_loader import load_benchmark

samples = load_benchmark()
print(f"Total benchmark samples: {len(samples)}")

for s in samples[:2]:
    print(f"ID {s.test_id} [{s.category}]: Target = {s.target_answer}")
    print(f"  EN: {s.english_prompt}")
    print(f"  GU: {s.gujlish_prompt}\n")

3. Re-Running the Evaluation on Any Hugging Face Model

To evaluate Qwen/Qwen2.5-1.5B-Instruct (or any other Hugging Face causal model) using greedy decoding:

python scripts/evaluate.py \
  --model_id "Qwen/Qwen2.5-1.5B-Instruct" \
  --benchmark_path "data/raw/benchmark_v1.json" \
  --output_dir "data/results" \
  --temperature 0.0 \
  --max_new_tokens 256

7. Dataset Schema

Each sample in data/raw/benchmark_v1.json adheres to the following JSON schema:

{
  "test_id": 10,
  "category": "rate_invariance_logic",
  "target_answer": "3",
  "target_numerical": 3.0,
  "unit": "minutes",
  "english_prompt": "If 3 cats can catch 3 mice in 3 minutes, how many minutes will it take 100 cats to catch 100 mice?",
  "gujlish_prompt": "Jo 3 biladi 3 minute ma 3 undar pakdi shake, toh 100 biladi ne 100 undar pakadva ma ketli minute lagse?",
  "collision_tokens": ["shake"]
}

8. Limitations & Future Work

  • Sample Size ($N=10$): Version 1.0 is explicitly scoped as an illustrative diagnostic case study. Future versions ($v2.0$) will scale to $N \ge 100$ problems across diverse mathematical sub-disciplines.
  • Model Families: Upcoming releases will expand comparative evaluations to meta-llama/Llama-3.2-1B-Instruct and google/gemma-2-2b-it.
  • Script Comparison: Evaluating native Gujarati Unicode script alongside Romanized Gujlish to precisely isolate the acoustic-to-orthographic tax from foundational multilingual reasoning deficits.

9. Citation

If you utilize this benchmark or build upon the token collision findings in your research, please cite:

@misc{gujlish_reasoning_eval_2026,
  author = {Jay Prajapati},
  title = {Gujlish-Reasoning-Eval: Evaluating Code-Switched Reasoning Collapse in Small Frontier Models},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/jay2219/Gujlish-Reasoning-Eval}}
}
Downloads last month
20