github / github/rust-gems

`bpe` Python Bindings?

Offen
#61 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
134
Forks
24
Ø Merge
16 Std. 27 Min.
Gemergte PRs (30 T.)
11

Beschreibung

Amazing work on `bpe`!

Wanted to see if there were any known Python bindings a la the snippets from tiktoken below?

```python
import tiktoken
enc = tiktoken.get_encoding("o200k_base")
assert enc.decode(enc.encode("hello world")) == "hello world"

# To get the tokeniser corresponding to a specific model in the OpenAI API:
enc = tiktoken.encoding_for_model("gpt-4o")
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.