Instructions to use litert-community/Julia-1-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/Julia-1-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Julia-1 LiteRT: S512 and S1024 fp32 graphs, float16 token table, Python host, conversion scripts
b92a0d2 verified Download conversion/make_table.py from litert-community/Julia-1-LiteRT: direct link, hf CLI and curl.
- Browser
- Download file 815 Bytes
-
https://huggingface.co/litert-community/Julia-1-LiteRT/resolve/main/conversion/make_table.py
- Command line
-
hf download hf://litert-community/Julia-1-LiteRT/conversion/make_table.py
-
curl -L -o make_table.py https://huggingface.co/litert-community/Julia-1-LiteRT/resolve/main/conversion/make_table.py
815 Bytes
| """Write the host token tables from the checkpoint: [256000, 384] little-endian float16 (shipped) and float32.""" | |
| import hashlib | |
| from pathlib import Path | |
| import numpy as np | |
| from safetensors import safe_open | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def main(): | |
| with safe_open(str(ROOT / 'src/Julia-1/model.safetensors'), 'pt') as f: | |
| table = f.get_tensor('encoder.embeddings.tok_embeddings.weight').numpy() | |
| assert table.shape == (256000, 384) and table.dtype == np.float32 | |
| out = ROOT / 'exports' | |
| out.mkdir(exist_ok=True) | |
| for name, dtype in (('julia1_token_table_fp16.bin', '<f2'), ('julia1_token_table_f32.bin', '<f4')): | |
| table.astype(dtype).tofile(out / name) | |
| print(name, hashlib.sha256((out / name).read_bytes()).hexdigest()) | |
| if __name__ == '__main__': | |
| main() | |