openai-tools icon indicating copy to clipboard operation
openai-tools copied to clipboard

decode method

Open Aya-S opened this issue 1 year ago • 2 comments

Can't find documentation for decode method in the cs class.is decode not supported?

Aya-S avatar Mar 20 '23 11:03 Aya-S

hi @Aya-S, you mean a method to go from a list of token IDs to a string? could you elaborate about the scenario where this could be useful?

Some tokens don't have an entry in the tokenizer vocabulary, so the process is not completely reversible.

dluc avatar Mar 22 '23 04:03 dluc

A good use cade for a Decode() method would be a TokenTextSplitter() method. It seems to be reversible because other libraries have working decode methods such as: https://github.com/hyunwoongko/gpt2-tokenizer-java/blob/master/src/main/java/ai/tunib/tokenizer/GPT2Tokenizer.java.

LassoMike avatar Apr 05 '23 05:04 LassoMike