Text Generation
Transformers
Safetensors
English
mistral
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use mwitiderrick/SwahiliInstruct-v0.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mwitiderrick/SwahiliInstruct-v0.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mwitiderrick/SwahiliInstruct-v0.2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mwitiderrick/SwahiliInstruct-v0.2") model = AutoModelForCausalLM.from_pretrained("mwitiderrick/SwahiliInstruct-v0.2") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mwitiderrick/SwahiliInstruct-v0.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mwitiderrick/SwahiliInstruct-v0.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mwitiderrick/SwahiliInstruct-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mwitiderrick/SwahiliInstruct-v0.2
- SGLang
How to use mwitiderrick/SwahiliInstruct-v0.2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mwitiderrick/SwahiliInstruct-v0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mwitiderrick/SwahiliInstruct-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mwitiderrick/SwahiliInstruct-v0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mwitiderrick/SwahiliInstruct-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mwitiderrick/SwahiliInstruct-v0.2 with Docker Model Runner:
docker model run hf.co/mwitiderrick/SwahiliInstruct-v0.2
Adding Evaluation Results
#1
by leaderboard-pr-bot - opened
README.md
CHANGED
|
@@ -1,19 +1,120 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
datasets:
|
| 4 |
- mwitiderrick/SwahiliAlpaca
|
|
|
|
| 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 |
# SwahiliInstruct-v0.2
|
| 19 |
|
|
@@ -51,3 +152,17 @@ Koroga mchanganyiko pamoja na mbegu za kikombe 1 1/2 za mtindi wenye jamii na ha
|
|
| 51 |
4. Kando ya uwanja, changanya zaini ya yai 2
|
| 52 |
"""
|
| 53 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- transformers
|
| 8 |
datasets:
|
| 9 |
- mwitiderrick/SwahiliAlpaca
|
| 10 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 11 |
inference: true
|
| 12 |
model_type: mistral
|
|
|
|
| 13 |
created_by: mwitiderrick
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
pipeline_tag: text-generation
|
| 15 |
+
model-index:
|
| 16 |
+
- name: SwahiliInstruct-v0.2
|
| 17 |
+
results:
|
| 18 |
+
- task:
|
| 19 |
+
type: text-generation
|
| 20 |
+
name: Text Generation
|
| 21 |
+
dataset:
|
| 22 |
+
name: AI2 Reasoning Challenge (25-Shot)
|
| 23 |
+
type: ai2_arc
|
| 24 |
+
config: ARC-Challenge
|
| 25 |
+
split: test
|
| 26 |
+
args:
|
| 27 |
+
num_few_shot: 25
|
| 28 |
+
metrics:
|
| 29 |
+
- type: acc_norm
|
| 30 |
+
value: 55.2
|
| 31 |
+
name: normalized accuracy
|
| 32 |
+
source:
|
| 33 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mwitiderrick/SwahiliInstruct-v0.2
|
| 34 |
+
name: Open LLM Leaderboard
|
| 35 |
+
- task:
|
| 36 |
+
type: text-generation
|
| 37 |
+
name: Text Generation
|
| 38 |
+
dataset:
|
| 39 |
+
name: HellaSwag (10-Shot)
|
| 40 |
+
type: hellaswag
|
| 41 |
+
split: validation
|
| 42 |
+
args:
|
| 43 |
+
num_few_shot: 10
|
| 44 |
+
metrics:
|
| 45 |
+
- type: acc_norm
|
| 46 |
+
value: 78.22
|
| 47 |
+
name: normalized accuracy
|
| 48 |
+
source:
|
| 49 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mwitiderrick/SwahiliInstruct-v0.2
|
| 50 |
+
name: Open LLM Leaderboard
|
| 51 |
+
- task:
|
| 52 |
+
type: text-generation
|
| 53 |
+
name: Text Generation
|
| 54 |
+
dataset:
|
| 55 |
+
name: MMLU (5-Shot)
|
| 56 |
+
type: cais/mmlu
|
| 57 |
+
config: all
|
| 58 |
+
split: test
|
| 59 |
+
args:
|
| 60 |
+
num_few_shot: 5
|
| 61 |
+
metrics:
|
| 62 |
+
- type: acc
|
| 63 |
+
value: 50.3
|
| 64 |
+
name: accuracy
|
| 65 |
+
source:
|
| 66 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mwitiderrick/SwahiliInstruct-v0.2
|
| 67 |
+
name: Open LLM Leaderboard
|
| 68 |
+
- task:
|
| 69 |
+
type: text-generation
|
| 70 |
+
name: Text Generation
|
| 71 |
+
dataset:
|
| 72 |
+
name: TruthfulQA (0-shot)
|
| 73 |
+
type: truthful_qa
|
| 74 |
+
config: multiple_choice
|
| 75 |
+
split: validation
|
| 76 |
+
args:
|
| 77 |
+
num_few_shot: 0
|
| 78 |
+
metrics:
|
| 79 |
+
- type: mc2
|
| 80 |
+
value: 57.08
|
| 81 |
+
source:
|
| 82 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mwitiderrick/SwahiliInstruct-v0.2
|
| 83 |
+
name: Open LLM Leaderboard
|
| 84 |
+
- task:
|
| 85 |
+
type: text-generation
|
| 86 |
+
name: Text Generation
|
| 87 |
+
dataset:
|
| 88 |
+
name: Winogrande (5-shot)
|
| 89 |
+
type: winogrande
|
| 90 |
+
config: winogrande_xl
|
| 91 |
+
split: validation
|
| 92 |
+
args:
|
| 93 |
+
num_few_shot: 5
|
| 94 |
+
metrics:
|
| 95 |
+
- type: acc
|
| 96 |
+
value: 73.24
|
| 97 |
+
name: accuracy
|
| 98 |
+
source:
|
| 99 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mwitiderrick/SwahiliInstruct-v0.2
|
| 100 |
+
name: Open LLM Leaderboard
|
| 101 |
+
- task:
|
| 102 |
+
type: text-generation
|
| 103 |
+
name: Text Generation
|
| 104 |
+
dataset:
|
| 105 |
+
name: GSM8k (5-shot)
|
| 106 |
+
type: gsm8k
|
| 107 |
+
config: main
|
| 108 |
+
split: test
|
| 109 |
+
args:
|
| 110 |
+
num_few_shot: 5
|
| 111 |
+
metrics:
|
| 112 |
+
- type: acc
|
| 113 |
+
value: 11.45
|
| 114 |
+
name: accuracy
|
| 115 |
+
source:
|
| 116 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mwitiderrick/SwahiliInstruct-v0.2
|
| 117 |
+
name: Open LLM Leaderboard
|
| 118 |
---
|
| 119 |
# SwahiliInstruct-v0.2
|
| 120 |
|
|
|
|
| 152 |
4. Kando ya uwanja, changanya zaini ya yai 2
|
| 153 |
"""
|
| 154 |
```
|
| 155 |
+
|
| 156 |
+
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 157 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_mwitiderrick__SwahiliInstruct-v0.2)
|
| 158 |
+
|
| 159 |
+
| Metric |Value|
|
| 160 |
+
|---------------------------------|----:|
|
| 161 |
+
|Avg. |54.25|
|
| 162 |
+
|AI2 Reasoning Challenge (25-Shot)|55.20|
|
| 163 |
+
|HellaSwag (10-Shot) |78.22|
|
| 164 |
+
|MMLU (5-Shot) |50.30|
|
| 165 |
+
|TruthfulQA (0-shot) |57.08|
|
| 166 |
+
|Winogrande (5-shot) |73.24|
|
| 167 |
+
|GSM8k (5-shot) |11.45|
|
| 168 |
+
|