File size: 1,239 Bytes
ac13485
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
license: mit
library_name: kronos-mlx
pipeline_tag: time-series-forecasting
tags:
  - mlx
  - apple-silicon
  - finance
  - kronos
  - tokenizer
base_model: NeoQuasar/Kronos-Tokenizer-base
---

# Kronos-Tokenizer-base (MLX)

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.

Use it together with one of the MLX-native Kronos predictors, e.g. [`gxcsoccer/kronos-mlx-small`](https://huggingface.co/gxcsoccer/kronos-mlx-small).

## Usage

```python
from kronos_mlx import Kronos, KronosTokenizer, KronosPredictor

tokenizer = KronosTokenizer.from_pretrained("gxcsoccer/kronos-mlx-tokenizer-base")
model     = Kronos.from_pretrained("gxcsoccer/kronos-mlx-small")

predictor = KronosPredictor(model, tokenizer, max_context=512)
```

## Original

- Upstream: [shiyu-coder/Kronos](https://github.com/shiyu-coder/Kronos)
- PyTorch weights: [NeoQuasar/Kronos-Tokenizer-base](https://huggingface.co/NeoQuasar/Kronos-Tokenizer-base)