File size: 2,810 Bytes
ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e d95f1d1 ec4a92e |
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
<h1 align="center">
<img src="logo.png" alt="IJK Technology" width="100" style="vertical-align: middle; margin-right: 10px;">
IJK Technology β ByteGPT-small
</h1>
**ByteGPT-small** is a small GPT-style language model trained using byte tokenization inspired by the ByT5 paper. It is designed for use on compute- and memory-constrained devices, such as mobile phones and embedded systems.
## π Overview
- **Model Type:** GPT-style causal language model
- **Tokenizer:** Byte-level tokenization (from ByT5)
- **Intended Use:** Edge devices, mobile phones, embedded systems
- **Size:** Small (initial prototype)
- **Training:** Custom-trained from scratch
## π§ Why Byte Tokenization?
Byte tokenization offers several advantages for small-scale, efficient models:
1. **Reduced Memory Footprint:**
Byte-level tokenization drastically reduces the size of the embedding layer, making the model suitable for devices with limited RAM.
2. **No External Dependencies:**
Unlike subword tokenizers (e.g., SentencePiece, BPE), byte tokenization requires no external libraries for tokenization. A simple Python script can handle tokenization.
3. **Robustness to Noise:**
Byte-level models are more robust to misspellings, typos, and out-of-vocabulary tokens.
## π‘ Future Plans
This is the **first** in a series of models. While this model is not yet highly useful due to its small size, it represents the foundation for future versions. Upcoming releases will include:
- **Larger Models:** Scaled-up versions with better performance
- **Distilled Models:** Using GPRO distillation to create highly efficient small models
- **Benchmark Results:** Comparative performance on mobile devices
## π» Usage
### **Quick Start (with `transformers`):**
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ijktech/ByteGPT-small", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("ijktech/ByteGPT-small")
input_text = "What is the capital of France?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
### Tokenizer
The tokenizer is byte-level, compatible with AutoTokenizer from Hugging Face:
```python
tokenizer = AutoTokenizer.from_pretrained("ijktech/ByteGPT-small")
```
## π License
π **Non-Commercial License**: Free for hobbyists and personal projects.
πΌ **Commercial Use**: Contact IJK Technology Ltd for licensing.
## π οΈ About IJK Technology Ltd
IJK Technology Ltd (IJKTech) develops innovative machine learning models optimized for on-device inference. Our focus is on efficiency, privacy, and usability across mobile and embedded platforms. |