Initial MLX-native tokenizer weights
Browse files- README.md +34 -0
- config.json +18 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: kronos-mlx
|
| 4 |
+
pipeline_tag: time-series-forecasting
|
| 5 |
+
tags:
|
| 6 |
+
- mlx
|
| 7 |
+
- apple-silicon
|
| 8 |
+
- finance
|
| 9 |
+
- kronos
|
| 10 |
+
- tokenizer
|
| 11 |
+
base_model: NeoQuasar/Kronos-Tokenizer-base
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Kronos-Tokenizer-base (MLX)
|
| 15 |
+
|
| 16 |
+
Apple [MLX](https://github.com/ml-explore/mlx) port of [`NeoQuasar/Kronos-Tokenizer-base`](https://huggingface.co/NeoQuasar/Kronos-Tokenizer-base) — the BSQ (Binary Spherical Quantizer) tokenizer that compresses OHLCV candlestick sequences into hierarchical discrete tokens for the [Kronos](https://github.com/shiyu-coder/Kronos) family of forecasting models.
|
| 17 |
+
|
| 18 |
+
Use it together with one of the MLX-native Kronos predictors, e.g. [`gxcsoccer/kronos-mlx-small`](https://huggingface.co/gxcsoccer/kronos-mlx-small).
|
| 19 |
+
|
| 20 |
+
## Usage
|
| 21 |
+
|
| 22 |
+
```python
|
| 23 |
+
from kronos_mlx import Kronos, KronosTokenizer, KronosPredictor
|
| 24 |
+
|
| 25 |
+
tokenizer = KronosTokenizer.from_pretrained("gxcsoccer/kronos-mlx-tokenizer-base")
|
| 26 |
+
model = Kronos.from_pretrained("gxcsoccer/kronos-mlx-small")
|
| 27 |
+
|
| 28 |
+
predictor = KronosPredictor(model, tokenizer, max_context=512)
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Original
|
| 32 |
+
|
| 33 |
+
- Upstream: [shiyu-coder/Kronos](https://github.com/shiyu-coder/Kronos)
|
| 34 |
+
- PyTorch weights: [NeoQuasar/Kronos-Tokenizer-base](https://huggingface.co/NeoQuasar/Kronos-Tokenizer-base)
|
config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"attn_dropout_p": 0.0,
|
| 3 |
+
"beta": 0.05,
|
| 4 |
+
"d_in": 6,
|
| 5 |
+
"d_model": 256,
|
| 6 |
+
"ff_dim": 512,
|
| 7 |
+
"ffn_dropout_p": 0.0,
|
| 8 |
+
"gamma": 1.1,
|
| 9 |
+
"gamma0": 1.0,
|
| 10 |
+
"group_size": 4,
|
| 11 |
+
"n_dec_layers": 4,
|
| 12 |
+
"n_enc_layers": 4,
|
| 13 |
+
"n_heads": 4,
|
| 14 |
+
"resid_dropout_p": 0.0,
|
| 15 |
+
"s1_bits": 10,
|
| 16 |
+
"s2_bits": 10,
|
| 17 |
+
"zeta": 0.05
|
| 18 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c6f4ee1d9a96571e8afb3d78a16158c972ae273ded8bd4e78ae9c4d2081049b
|
| 3 |
+
size 15840646
|