Update README_TEMPLATE.md
Browse files- README_TEMPLATE.md +30 -1
README_TEMPLATE.md
CHANGED
|
@@ -15,4 +15,33 @@ BLOOM is an autoregressive Large Language Model (LLM), trained to continue text
|
|
| 15 |
## Converted Models
|
| 16 |
$MODELS$
|
| 17 |
|
| 18 |
-
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
## Converted Models
|
| 16 |
$MODELS$
|
| 17 |
|
| 18 |
+
## Usage
|
| 19 |
+
|
| 20 |
+
### Python via [llm-rs](https://github.com/LLukas22/llm-rs-python):
|
| 21 |
+
|
| 22 |
+
#### Installation
|
| 23 |
+
Via pip: `pip install llm-rs`
|
| 24 |
+
|
| 25 |
+
#### Run inference
|
| 26 |
+
```python
|
| 27 |
+
from llm_rs import AutoModel
|
| 28 |
+
|
| 29 |
+
#Load the model, define any model you like from the list above as the `model_file`
|
| 30 |
+
model = AutoModel.from_pretrained("rustformers/bloom-ggml",model_file="bloom-3b-q4_0-ggjt.bin")
|
| 31 |
+
|
| 32 |
+
#Generate
|
| 33 |
+
print(model.generate("The meaning of life is"))
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
### Rust via [Rustformers/llm](https://github.com/rustformers/llm):
|
| 37 |
+
|
| 38 |
+
#### Installation
|
| 39 |
+
```
|
| 40 |
+
git clone --recurse-submodules git@github.com:rustformers/llm.git
|
| 41 |
+
cargo build --release
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
#### Run inference
|
| 45 |
+
```
|
| 46 |
+
cargo run --release -- bloom infer -m path/to/model.bin -p "Tell me how cool the Rust programming language is:"
|
| 47 |
+
```
|