Update README.md
Browse files
README.md
CHANGED
@@ -17,6 +17,21 @@ base_model: unsloth/gemma-7b-bnb-4bit
|
|
17 |
- **License:** apache-2.0
|
18 |
- **Finetuned from model :** unsloth/gemma-7b-bnb-4bit
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
17 |
- **License:** apache-2.0
|
18 |
- **Finetuned from model :** unsloth/gemma-7b-bnb-4bit
|
19 |
|
20 |
+
```python3
|
21 |
+
|
22 |
+
from llama_index.llms.huggingface import HuggingFaceLLM
|
23 |
+
llm = HuggingFaceLLM(
|
24 |
+
context_window=4096,
|
25 |
+
max_new_tokens=256,
|
26 |
+
generate_kwargs={"temperature": 0.7, "do_sample": False},
|
27 |
+
tokenizer_name="Mollel/Swahili_Gemma",
|
28 |
+
model_name="Mollel/Swahili_Gemma",
|
29 |
+
device_map="auto",
|
30 |
+
stopping_ids=[50278, 50279, 50277, 1, 0],
|
31 |
+
tokenizer_kwargs={"max_length": 4096},
|
32 |
+
model_kwargs={"torch_dtype": torch.float16}
|
33 |
+
)
|
34 |
+
|
35 |
+
```
|
36 |
+
|
37 |
|
|