Update README.md
Browse files
README.md
CHANGED
|
@@ -5,4 +5,100 @@ license_link: LICENSE
|
|
| 5 |
base_model:
|
| 6 |
- theguywhosucks/mochaV1-base
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
base_model:
|
| 6 |
- theguywhosucks/mochaV1-base
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
+
---
|
| 9 |
+
# Mocha Mini β
|
| 10 |
+
|
| 11 |
+
Mocha Mini is a **tiny but mighty sentence completion model** designed for **fast, creative text generation** without the bloat. Perfect for small projects, prototyping, or just having fun with text.
|
| 12 |
+
|
| 13 |
+
<p align="center">
|
| 14 |
+
<img src="./banner.png" alt="Mocha Mini Banner" width="600"/>
|
| 15 |
+
</p>
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
## β‘ Features
|
| 20 |
+
|
| 21 |
+
* π **Ultra-Lightweight** β fast loading, easy deployment.
|
| 22 |
+
* βοΈ **Sentence Completion** β generate relevant endings from any text prompt.
|
| 23 |
+
* π‘ **Safetensors Format** β secure, efficient, and easy to load.
|
| 24 |
+
* π¨ **Custom Tokenization** β uses `stoi`/`itos` for fully local control.
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## π Project Structure
|
| 29 |
+
|
| 30 |
+
```
|
| 31 |
+
.
|
| 32 |
+
βββ mocha.safetensors # Model weights
|
| 33 |
+
βββ config.json
|
| 34 |
+
βββ generation_config.json
|
| 35 |
+
βββ itos.json # Index-to-string mapping
|
| 36 |
+
βββ stoi.json # String-to-index mapping
|
| 37 |
+
βββ logo.png # Project logo
|
| 38 |
+
βββ banner.png # Project banner
|
| 39 |
+
βββ README.md
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## π Quick Start
|
| 45 |
+
|
| 46 |
+
No official tokenizer? No problem β Mocha Mini just needs your `stoi`/`itos` for input/output mapping:
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
import torch
|
| 50 |
+
from transformers import AutoModelForCausalLM, AutoConfig
|
| 51 |
+
|
| 52 |
+
# Load config and model
|
| 53 |
+
config = AutoConfig.from_pretrained("theguywhosucks/mochaV1-base", trust_remote_code=True)
|
| 54 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 55 |
+
"theguywhosucks/mochaV1-base",
|
| 56 |
+
config=config,
|
| 57 |
+
device_map="auto",
|
| 58 |
+
load_in_8bit=True, # INT8 quantization for speed & memory
|
| 59 |
+
trust_remote_code=True,
|
| 60 |
+
use_safetensors=True
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
# Use your custom stoi/itos for input/output
|
| 64 |
+
def stoi(text): ...
|
| 65 |
+
def tosi(indices): ...
|
| 66 |
+
|
| 67 |
+
prompt = "The future of AI is"
|
| 68 |
+
tokens = stoi(prompt)
|
| 69 |
+
# Model inference logic here
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## πΈ Assets
|
| 75 |
+
|
| 76 |
+
<p align="center">
|
| 77 |
+
<img src="./logo.png" alt="Mocha Mini Logo" width="120"/>
|
| 78 |
+
</p>
|
| 79 |
+
|
| 80 |
+
---
|
| 81 |
+
|
| 82 |
+
## π Requirements
|
| 83 |
+
|
| 84 |
+
* Python 3.9+
|
| 85 |
+
* [Transformers](https://pypi.org/project/transformers/)
|
| 86 |
+
* [Safetensors](https://pypi.org/project/safetensors/)
|
| 87 |
+
* [PyTorch](https://pytorch.org/)
|
| 88 |
+
* [bitsandbytes](https://pypi.org/project/bitsandbytes/) (optional for INT8 quantization)
|
| 89 |
+
|
| 90 |
+
Install all dependencies:
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
pip install torch transformers safetensors bitsandbytes
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
+
## π License
|
| 99 |
+
|
| 100 |
+
Licensed under the **Mocha Proprietary License** β usage, distribution, and modification are restricted. See [LICENSE](./LICENSE) for details.
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
β **Mocha Mini** β tiny, fast, and ready to complete your sentences.
|