Skip to content

GPT2Codec suggestion #2

@Deltrego

Description

@Deltrego

A small improvement on gpt2's bpe ranking code (GPT2Codec.java): byte decoding can be performed at load time on every key from encoder.json and every space-separated pair from vocab.bpe (after invoking split(" ") on the string).
This avoids having to perform the byte conversion every time in memory.
Tested with my own implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions