mwitiderrick commited on
Commit
2c2de6e
1 Parent(s): 03eaf04

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -0
README.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: mistralai/Mistral-7B-v0.1
3
+ datasets:
4
+ - wikimedia/wikipedia
5
+ inference: true
6
+ model_type: mistral
7
+
8
+ created_by: mwitiderrick
9
+ tags:
10
+ - transformers
11
+ license: apache-2.0
12
+ language:
13
+ - en
14
+ library_name: transformers
15
+ pipeline_tag: text-generation
16
+
17
+ ---
18
+ # SwahiliGPT
19
+
20
+ This is a [Mistral model](https://huggingface.co/mistralai/Mistral-7B-v0.1) that has been fine-tuned on the [Wikipedia Swahili dataset](https://huggingface.co/datasets/wikimedia/wikipedia/viewer/20231101.sw).
21
+
22
+
23
+ ## Usage
24
+ ```python
25
+ # Load model directly
26
+ from transformers import AutoTokenizer, AutoModelForCausalLM
27
+
28
+ tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/SwahiliGPT_v0.1")
29
+ model = AutoModelForCausalLM.from_pretrained("mwitiderrick/SwahiliGPT_v0.1", device_map="auto")
30
+ inputs = tokenizer("Hapo zamani za kale", return_tensors="pt")
31
+ outputs = model.generate(**inputs, max_new_tokens=200, do_sample=True, repetition_penalty=1.1)
32
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
33
+
34
+
35
+ """
36
+ Hapo zamani za kale katika historia ya jamii, ambavyo sehemu moja hutazama historia ile inayopendekezwa au inayojulikana, na sehemu nyingine inafanya history ambalai hainajulikana.
37
+ Utaifishaji unaleta utata kwanza mambo ya karne zilizoandamana, na seconda matokeo yanatokana na vipitio vya maisha muhimu ambavyo haivyo vitakuva mahitaji katika jamii hiyo (hunajua wakiweka mitindo katakatani). Ni kinyume kingine kwamba kuna sifa ambayo umechukizwa vitu hivi vilitengenezwa zaidi.
38
+
39
+ Katika Afrika Magharibi, historia huitwa ngan
40
+ """
41
+ ```