Add model card README
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758---tags:- tokielibrary_name: tokie---
<p align="center"> <img src="tokie-banner.png" alt="tokie" width="600"></p>
# phi-2
Pre-built [tokie](https://github.com/chonkie-inc/tokie) tokenizer for [microsoft/phi-2](https://huggingface.co/microsoft/phi-2).
## Quick Start (Python)
```bashpip install tokie```
```pythonimport tokie
tokenizer = tokie.Tokenizer.from_pretrained("tokiers/phi-2")encoding = tokenizer.encode("Hello, world!")print(encoding.ids)print(encoding.attention_mask)```
## Quick Start (Rust)
```toml[dependencies]tokie = { version = "0.0.4", features = ["hf"] }```
```rustuse tokie::Tokenizer;
let tokenizer = Tokenizer::from_pretrained("tokiers/phi-2").unwrap();let encoding = tokenizer.encode("Hello, world!", true);println!("{:?}", encoding.ids);```
## Files
- `tokenizer.tkz` — tokie binary format (~10x smaller, loads in ~5ms)- `tokenizer.json` — original HuggingFace tokenizer
## About tokie
**50x faster tokenization, 10x smaller model files, 100% accurate.**
tokie is a drop-in replacement for HuggingFace tokenizers, built in Rust. See [GitHub](https://github.com/chonkie-inc/tokie) for benchmarks and documentation.
## License
MIT OR Apache-2.0 (tokie library). Original model files retain their original license from [microsoft/phi-2](https://huggingface.co/microsoft/phi-2).README.mdAdded+58