File size: 1,436 Bytes
28498d7 3c1b20a 28498d7 3c1b20a 28498d7 3c1b20a | 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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | ---
language:
- en
pipeline_tag: text-generation
library_name: pytorch
tags:
- chatbot
- text-generation
- causal-lm
- pytorch
- sentencepiece
license: mit
---
# qWisp-base-v1 (70M)
qWisp-base-v1 is a lightweight language model built for fast local inference, experimentation, and integration into Python applications.
## Features
* Lightweight and fast
* Local inference (no internet required)
* CPU, CUDA, and Apple Silicon (MPS) support
* SentencePiece tokenizer
* Simple Python API
## Installation
Clone or download the repository, then install the required dependencies:
```bash
pip install torch sentencepiece
```
## Quick Start
```python
from qwisp import Wisp
w = Wisp().load()
print(w("Hello!"))
```
## Custom Generation
```python
response = w(
"Write a short poem about the ocean.",
temperature=0.7,
top_k=40,
max_new_tokens=200,
)
print(response)
```
You can also call `generate()` directly:
```python
response = w.generate(
"Your prompt here",
temperature=0.8,
top_k=50,
max_new_tokens=200,
)
```
## Utility Methods
```python
w.encode("Hello world")
w.decode(token_ids)
w.unload()
```
## Requirements
* Python 3.10+
* PyTorch
* SentencePiece
## Notes
* The default model and tokenizer are automatically loaded from the package directory.
* The model is intended for research, experimentation, and general-purpose text generation.
## License
MIT License |