sergiopaniego's picture
sergiopaniego HF Staff
Update the dataset card
2602ca9 verified
|
Raw History Blame Contribute Delete
2.76 kB
metadata
license: apache-2.0
task_categories:
  - text-generation
tags:
  - sudoku
  - tool-calling
  - openenv
  - trl
  - sft
size_categories:
  - 1K<n<10K
dataset_info:
  features:
    - name: messages
      list:
        - name: role
          dtype: string
        - name: content
          dtype: string
        - name: reasoning_content
          dtype: string
        - name: tool_calls
          list:
            - name: type
              dtype: string
            - name: function
              struct:
                - name: name
                  dtype: string
                - name: arguments
                  struct:
                    - name: row
                      dtype: int64
                    - name: col
                      dtype: int64
                    - name: number
                      dtype: int64
        - name: name
          dtype: string
    - name: tools
      dtype: string
  splits:
    - name: train
      num_bytes: 17749144
      num_examples: 1000
  download_size: 1793721
  dataset_size: 17749144
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

Sudoku tool-call SFT

1,000 solved Sudoku games written as tool-calling conversations, for a short SFT warmup before training with GRPO on the OpenEnv Sudoku environment. Used in the OpenEnv Sudoku tutorial to train openenv/Qwen3-1.7B-Sudoku-SFT.

A solver played every game against the TextArena Sudoku-v0 environment from OpenEnv 0.10.0, run in-process, on boards from TextArena's own generator with 50, 55, 60 or 65 clues (15 to 31 empty cells). It only uses single candidates: the one digit a cell can take, or the one cell a digit can take in a row, column or box. Boards that need more than that are skipped, so every reasoning step can be checked on the grid.

  • messages: the user prompt (the rules plus the starting grid), then one assistant turn per move, with a short reasoning_content and a call to the place tool, each followed by a tool message with the updated grid. The last assistant turn says the puzzle is solved.
  • tools: the place tool schema, as a JSON string.

This is the format TRL's GRPOTrainer renders with environment_factory, so a model trained on it plays the same way during RL. Train with SFTTrainer and assistant_only_loss=True. Games are 8k to 15k tokens long, since every tool result carries the whole grid.

Games have 24 moves on average, and the reasoning is about 45 words per move. None of the boards appears in the evaluation puzzles of the tutorial.

Regenerate

uv run generate_sft_data.py --games 1000 --push-to-hub <user>/sudoku-tool-calls-sft

The script is in OpenEnv examples/sudoku.