{
  "scope": "Tiny fixed vocabularies/merges; BPE and WordPiece inference only, plus independent Unicode normalization examples. No tokenizer training, downloaded vocabulary/model, Transformers/SentencePiece run, architecture inference, quality benchmark or offsets.",
  "environment": {
    "python": "3.10.12",
    "tokenizers": "0.22.2",
    "python_unicodedata_version": "13.0.0",
    "execution": "CPU host; no GPU or neural model"
  },
  "bpe": {
    "vocabulary_ids_hand_assigned": {
      "[UNK]": 0,
      "a": 1,
      "b": 2,
      "c": 3,
      "ab": 4,
      "bc": 5
    },
    "options": {
      "dropout": null,
      "ignore_merges": false,
      "byte_fallback": false,
      "normalizer": null,
      "pre_tokenizer": null,
      "special_token_postprocessor": null
    },
    "same_vocabulary_two_merge_orders": [
      {
        "ordered_merges_rank_zero_first": [
          [
            "b",
            "c"
          ],
          [
            "a",
            "b"
          ]
        ],
        "input": "abc",
        "tokens": [
          "a",
          "bc"
        ],
        "ids": [
          1,
          5
        ],
        "reference_trace": [
          {
            "before": [
              "a",
              "b",
              "c"
            ],
            "pair": [
              "b",
              "c"
            ],
            "rank": 0,
            "position": 1,
            "after": [
              "a",
              "bc"
            ]
          }
        ]
      },
      {
        "ordered_merges_rank_zero_first": [
          [
            "a",
            "b"
          ],
          [
            "b",
            "c"
          ]
        ],
        "input": "abc",
        "tokens": [
          "ab",
          "c"
        ],
        "ids": [
          4,
          3
        ],
        "reference_trace": [
          {
            "before": [
              "a",
              "b",
              "c"
            ],
            "pair": [
              "a",
              "b"
            ],
            "rank": 0,
            "position": 0,
            "after": [
              "ab",
              "c"
            ]
          }
        ]
      }
    ],
    "vocabulary_only_longest_prefix_contrast": [
      "ab",
      "c"
    ],
    "meaning": "The same vocabulary permits a|bc or ab|c. Ranked merges, not vocabulary longest-prefix alone, determine these deterministic BPE results. This is not byte-level BPE and has no all-Unicode coverage claim."
  },
  "wordpiece": {
    "vocabulary_ids_hand_assigned": {
      "[UNK]": 0,
      "ab": 1,
      "a": 2,
      "##bc": 3,
      "##c": 4,
      "b": 5
    },
    "options": {
      "continuation_prefix": "##",
      "normalizer": null,
      "pre_tokenizer": "WhitespaceSplit",
      "max_input_chars_per_word": 100,
      "special_token_postprocessor": null
    },
    "cases": [
      {
        "input": "abc",
        "whitespace_pretokens": [
          "abc"
        ],
        "tokens": [
          "ab",
          "##c"
        ],
        "ids": [
          1,
          4
        ],
        "per_word_reference_traces": [
          [
            {
              "position": 0,
              "matched": "ab"
            },
            {
              "position": 2,
              "matched": "##c"
            }
          ]
        ]
      },
      {
        "input": "bc",
        "whitespace_pretokens": [
          "bc"
        ],
        "tokens": [
          "b",
          "##c"
        ],
        "ids": [
          5,
          4
        ],
        "per_word_reference_traces": [
          [
            {
              "position": 0,
              "matched": "b"
            },
            {
              "position": 1,
              "matched": "##c"
            }
          ]
        ]
      },
      {
        "input": "c",
        "whitespace_pretokens": [
          "c"
        ],
        "tokens": [
          "[UNK]"
        ],
        "ids": [
          0
        ],
        "per_word_reference_traces": [
          [
            {
              "unmatched_suffix": "c",
              "discarded_successful_prefix_pieces": []
            }
          ]
        ]
      },
      {
        "input": "abx",
        "whitespace_pretokens": [
          "abx"
        ],
        "tokens": [
          "[UNK]"
        ],
        "ids": [
          0
        ],
        "per_word_reference_traces": [
          [
            {
              "position": 0,
              "matched": "ab"
            },
            {
              "unmatched_suffix": "x",
              "discarded_successful_prefix_pieces": [
                "ab"
              ]
            }
          ]
        ]
      },
      {
        "input": "abc bc",
        "whitespace_pretokens": [
          "abc",
          "bc"
        ],
        "tokens": [
          "ab",
          "##c",
          "b",
          "##c"
        ],
        "ids": [
          1,
          4,
          5,
          4
        ],
        "per_word_reference_traces": [
          [
            {
              "position": 0,
              "matched": "ab"
            },
            {
              "position": 2,
              "matched": "##c"
            }
          ],
          [
            {
              "position": 0,
              "matched": "b"
            },
            {
              "position": 1,
              "matched": "##c"
            }
          ]
        ]
      }
    ],
    "meaning": "##c is legal as a continuation but no plain c token exists at word start. For abx the matched ab prefix is discarded: one entire pretokenized word becomes [UNK]. No claim about original Google WordPiece training or trainer scoring."
  },
  "unicode_codepoints_and_utf8": [
    {
      "text": "A",
      "unicode_codepoints": [
        "U+0041"
      ],
      "python_codepoint_count": 1,
      "utf8_bytes_hex": "41",
      "utf8_byte_count": 1,
      "utf8_decode_roundtrip": true
    },
    {
      "text": "中",
      "unicode_codepoints": [
        "U+4E2D"
      ],
      "python_codepoint_count": 1,
      "utf8_bytes_hex": "e4 b8 ad",
      "utf8_byte_count": 3,
      "utf8_decode_roundtrip": true
    },
    {
      "text": "é",
      "unicode_codepoints": [
        "U+00E9"
      ],
      "python_codepoint_count": 1,
      "utf8_bytes_hex": "c3 a9",
      "utf8_byte_count": 2,
      "utf8_decode_roundtrip": true
    },
    {
      "text": "é",
      "unicode_codepoints": [
        "U+0065",
        "U+0301"
      ],
      "python_codepoint_count": 2,
      "utf8_bytes_hex": "65 cc 81",
      "utf8_byte_count": 3,
      "utf8_decode_roundtrip": true
    }
  ],
  "normalization_separate_from_tokenizers": {
    "pipeline": [
      "NFD",
      "Lowercase",
      "StripAccents"
    ],
    "cases": [
      {
        "input": {
          "text": "É",
          "unicode_codepoints": [
            "U+00C9"
          ],
          "python_codepoint_count": 1,
          "utf8_bytes_hex": "c3 89",
          "utf8_byte_count": 2,
          "utf8_decode_roundtrip": true
        },
        "normalized": {
          "text": "e",
          "unicode_codepoints": [
            "U+0065"
          ],
          "python_codepoint_count": 1,
          "utf8_bytes_hex": "65",
          "utf8_byte_count": 1,
          "utf8_decode_roundtrip": true
        },
        "input_equals_normalized": false
      },
      {
        "input": {
          "text": "É",
          "unicode_codepoints": [
            "U+0045",
            "U+0301"
          ],
          "python_codepoint_count": 2,
          "utf8_bytes_hex": "45 cc 81",
          "utf8_byte_count": 3,
          "utf8_decode_roundtrip": true
        },
        "normalized": {
          "text": "e",
          "unicode_codepoints": [
            "U+0065"
          ],
          "python_codepoint_count": 1,
          "utf8_bytes_hex": "65",
          "utf8_byte_count": 1,
          "utf8_decode_roundtrip": true
        },
        "input_equals_normalized": false
      },
      {
        "input": {
          "text": "e",
          "unicode_codepoints": [
            "U+0065"
          ],
          "python_codepoint_count": 1,
          "utf8_bytes_hex": "65",
          "utf8_byte_count": 1,
          "utf8_decode_roundtrip": true
        },
        "normalized": {
          "text": "e",
          "unicode_codepoints": [
            "U+0065"
          ],
          "python_codepoint_count": 1,
          "utf8_bytes_hex": "65",
          "utf8_byte_count": 1,
          "utf8_decode_roundtrip": true
        },
        "input_equals_normalized": true
      }
    ],
    "distinct_originals_collide": true,
    "separate_NFKC_compatibility_case": {
      "input": {
        "text": "Ａ①",
        "unicode_codepoints": [
          "U+FF21",
          "U+2460"
        ],
        "python_codepoint_count": 2,
        "utf8_bytes_hex": "ef bc a1 e2 91 a0",
        "utf8_byte_count": 6,
        "utf8_decode_roundtrip": true
      },
      "normalized": {
        "text": "A1",
        "unicode_codepoints": [
          "U+0041",
          "U+0031"
        ],
        "python_codepoint_count": 2,
        "utf8_bytes_hex": "41 31",
        "utf8_byte_count": 2,
        "utf8_decode_roundtrip": true
      }
    },
    "meaning": "UTF-8 encode/decode is exact for these valid strings. Normalization maps different originals to the same output, so the normalized string alone cannot recover original case, accent or composition. NFKC additionally folds the shown compatibility forms. Codepoint count is not a general visible-grapheme count. No token offsets or decoder roundtrip is tested."
  }
}
