Instructions to use ifable/gemma-2-Ifable-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ifable/gemma-2-Ifable-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ifable/gemma-2-Ifable-9B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ifable/gemma-2-Ifable-9B") model = AutoModelForCausalLM.from_pretrained("ifable/gemma-2-Ifable-9B") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ifable/gemma-2-Ifable-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ifable/gemma-2-Ifable-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ifable/gemma-2-Ifable-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ifable/gemma-2-Ifable-9B
- SGLang
How to use ifable/gemma-2-Ifable-9B 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 "ifable/gemma-2-Ifable-9B" \ --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": "ifable/gemma-2-Ifable-9B", "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 "ifable/gemma-2-Ifable-9B" \ --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": "ifable/gemma-2-Ifable-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ifable/gemma-2-Ifable-9B with Docker Model Runner:
docker model run hf.co/ifable/gemma-2-Ifable-9B
Adding Evaluation Results
#5
by leaderboard-pr-bot - opened
README.md
CHANGED
|
@@ -3,6 +3,101 @@ license: gemma
|
|
| 3 |
library_name: transformers
|
| 4 |
datasets:
|
| 5 |
- jondurbin/gutenberg-dpo-v0.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 8 |
should probably proofread and complete it, then remove this comment. -->
|
|
@@ -62,4 +157,17 @@ The following hyperparameters were used during training:
|
|
| 62 |
- Tokenizers 0.19.1
|
| 63 |
|
| 64 |
|
| 65 |
-
We are looking for product manager and operations managers to build applications through our model, and also open for business cooperation, and also AI engineer to join us, contact with : contact@ifable.ai
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
datasets:
|
| 5 |
- jondurbin/gutenberg-dpo-v0.1
|
| 6 |
+
model-index:
|
| 7 |
+
- name: gemma-2-Ifable-9B
|
| 8 |
+
results:
|
| 9 |
+
- task:
|
| 10 |
+
type: text-generation
|
| 11 |
+
name: Text Generation
|
| 12 |
+
dataset:
|
| 13 |
+
name: IFEval (0-Shot)
|
| 14 |
+
type: HuggingFaceH4/ifeval
|
| 15 |
+
args:
|
| 16 |
+
num_few_shot: 0
|
| 17 |
+
metrics:
|
| 18 |
+
- type: inst_level_strict_acc and prompt_level_strict_acc
|
| 19 |
+
value: 29.84
|
| 20 |
+
name: strict accuracy
|
| 21 |
+
source:
|
| 22 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ifable/gemma-2-Ifable-9B
|
| 23 |
+
name: Open LLM Leaderboard
|
| 24 |
+
- task:
|
| 25 |
+
type: text-generation
|
| 26 |
+
name: Text Generation
|
| 27 |
+
dataset:
|
| 28 |
+
name: BBH (3-Shot)
|
| 29 |
+
type: BBH
|
| 30 |
+
args:
|
| 31 |
+
num_few_shot: 3
|
| 32 |
+
metrics:
|
| 33 |
+
- type: acc_norm
|
| 34 |
+
value: 41.03
|
| 35 |
+
name: normalized accuracy
|
| 36 |
+
source:
|
| 37 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ifable/gemma-2-Ifable-9B
|
| 38 |
+
name: Open LLM Leaderboard
|
| 39 |
+
- task:
|
| 40 |
+
type: text-generation
|
| 41 |
+
name: Text Generation
|
| 42 |
+
dataset:
|
| 43 |
+
name: MATH Lvl 5 (4-Shot)
|
| 44 |
+
type: hendrycks/competition_math
|
| 45 |
+
args:
|
| 46 |
+
num_few_shot: 4
|
| 47 |
+
metrics:
|
| 48 |
+
- type: exact_match
|
| 49 |
+
value: 8.91
|
| 50 |
+
name: exact match
|
| 51 |
+
source:
|
| 52 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ifable/gemma-2-Ifable-9B
|
| 53 |
+
name: Open LLM Leaderboard
|
| 54 |
+
- task:
|
| 55 |
+
type: text-generation
|
| 56 |
+
name: Text Generation
|
| 57 |
+
dataset:
|
| 58 |
+
name: GPQA (0-shot)
|
| 59 |
+
type: Idavidrein/gpqa
|
| 60 |
+
args:
|
| 61 |
+
num_few_shot: 0
|
| 62 |
+
metrics:
|
| 63 |
+
- type: acc_norm
|
| 64 |
+
value: 12.19
|
| 65 |
+
name: acc_norm
|
| 66 |
+
source:
|
| 67 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ifable/gemma-2-Ifable-9B
|
| 68 |
+
name: Open LLM Leaderboard
|
| 69 |
+
- task:
|
| 70 |
+
type: text-generation
|
| 71 |
+
name: Text Generation
|
| 72 |
+
dataset:
|
| 73 |
+
name: MuSR (0-shot)
|
| 74 |
+
type: TAUR-Lab/MuSR
|
| 75 |
+
args:
|
| 76 |
+
num_few_shot: 0
|
| 77 |
+
metrics:
|
| 78 |
+
- type: acc_norm
|
| 79 |
+
value: 8.52
|
| 80 |
+
name: acc_norm
|
| 81 |
+
source:
|
| 82 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ifable/gemma-2-Ifable-9B
|
| 83 |
+
name: Open LLM Leaderboard
|
| 84 |
+
- task:
|
| 85 |
+
type: text-generation
|
| 86 |
+
name: Text Generation
|
| 87 |
+
dataset:
|
| 88 |
+
name: MMLU-PRO (5-shot)
|
| 89 |
+
type: TIGER-Lab/MMLU-Pro
|
| 90 |
+
config: main
|
| 91 |
+
split: test
|
| 92 |
+
args:
|
| 93 |
+
num_few_shot: 5
|
| 94 |
+
metrics:
|
| 95 |
+
- type: acc
|
| 96 |
+
value: 35.85
|
| 97 |
+
name: accuracy
|
| 98 |
+
source:
|
| 99 |
+
url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ifable/gemma-2-Ifable-9B
|
| 100 |
+
name: Open LLM Leaderboard
|
| 101 |
---
|
| 102 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 103 |
should probably proofread and complete it, then remove this comment. -->
|
|
|
|
| 157 |
- Tokenizers 0.19.1
|
| 158 |
|
| 159 |
|
| 160 |
+
We are looking for product manager and operations managers to build applications through our model, and also open for business cooperation, and also AI engineer to join us, contact with : contact@ifable.ai
|
| 161 |
+
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
|
| 162 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_ifable__gemma-2-Ifable-9B)
|
| 163 |
+
|
| 164 |
+
| Metric |Value|
|
| 165 |
+
|-------------------|----:|
|
| 166 |
+
|Avg. |22.73|
|
| 167 |
+
|IFEval (0-Shot) |29.84|
|
| 168 |
+
|BBH (3-Shot) |41.03|
|
| 169 |
+
|MATH Lvl 5 (4-Shot)| 8.91|
|
| 170 |
+
|GPQA (0-shot) |12.19|
|
| 171 |
+
|MuSR (0-shot) | 8.52|
|
| 172 |
+
|MMLU-PRO (5-shot) |35.85|
|
| 173 |
+
|