Text Generation
Transformers
Safetensors
English
gemma
code
conversational
text-generation-inference
Instructions to use LimYeri/CodeMind-Gemma-7B-QLoRA-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LimYeri/CodeMind-Gemma-7B-QLoRA-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LimYeri/CodeMind-Gemma-7B-QLoRA-4bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LimYeri/CodeMind-Gemma-7B-QLoRA-4bit") model = AutoModelForCausalLM.from_pretrained("LimYeri/CodeMind-Gemma-7B-QLoRA-4bit") 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 Settings
- vLLM
How to use LimYeri/CodeMind-Gemma-7B-QLoRA-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LimYeri/CodeMind-Gemma-7B-QLoRA-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LimYeri/CodeMind-Gemma-7B-QLoRA-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
- SGLang
How to use LimYeri/CodeMind-Gemma-7B-QLoRA-4bit 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 "LimYeri/CodeMind-Gemma-7B-QLoRA-4bit" \ --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": "LimYeri/CodeMind-Gemma-7B-QLoRA-4bit", "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 "LimYeri/CodeMind-Gemma-7B-QLoRA-4bit" \ --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": "LimYeri/CodeMind-Gemma-7B-QLoRA-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LimYeri/CodeMind-Gemma-7B-QLoRA-4bit with Docker Model Runner:
docker model run hf.co/LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
Adding Evaluation Results
#1
by leaderboard-pr-bot - opened
README.md
CHANGED
|
@@ -1,13 +1,116 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
tags:
|
| 4 |
- code
|
| 5 |
-
license: gemma
|
| 6 |
datasets:
|
| 7 |
- LimYeri/LeetCode_with_Solutions
|
| 8 |
-
language:
|
| 9 |
-
- en
|
| 10 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# CodeMind
|
|
@@ -109,4 +212,17 @@ print(result)
|
|
| 109 |
## Ethical Considerations
|
| 110 |
- The model should be used as a supportive tool for learning and problem-solving, not as a substitute for human expertise and critical thinking.
|
| 111 |
- Users should be aware that the model's responses are generated based on patterns in the training data and may not always be accurate, complete, or up to date.
|
| 112 |
-
- The model should not be relied upon for making critical decisions or solving real-world problems without thorough validation and testing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: gemma
|
| 5 |
library_name: transformers
|
| 6 |
tags:
|
| 7 |
- code
|
|
|
|
| 8 |
datasets:
|
| 9 |
- LimYeri/LeetCode_with_Solutions
|
|
|
|
|
|
|
| 10 |
pipeline_tag: text-generation
|
| 11 |
+
model-index:
|
| 12 |
+
- name: CodeMind-Gemma-7B-QLoRA-4bit
|
| 13 |
+
results:
|
| 14 |
+
- task:
|
| 15 |
+
type: text-generation
|
| 16 |
+
name: Text Generation
|
| 17 |
+
dataset:
|
| 18 |
+
name: AI2 Reasoning Challenge (25-Shot)
|
| 19 |
+
type: ai2_arc
|
| 20 |
+
config: ARC-Challenge
|
| 21 |
+
split: test
|
| 22 |
+
args:
|
| 23 |
+
num_few_shot: 25
|
| 24 |
+
metrics:
|
| 25 |
+
- type: acc_norm
|
| 26 |
+
value: 23.21
|
| 27 |
+
name: normalized accuracy
|
| 28 |
+
source:
|
| 29 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
|
| 30 |
+
name: Open LLM Leaderboard
|
| 31 |
+
- task:
|
| 32 |
+
type: text-generation
|
| 33 |
+
name: Text Generation
|
| 34 |
+
dataset:
|
| 35 |
+
name: HellaSwag (10-Shot)
|
| 36 |
+
type: hellaswag
|
| 37 |
+
split: validation
|
| 38 |
+
args:
|
| 39 |
+
num_few_shot: 10
|
| 40 |
+
metrics:
|
| 41 |
+
- type: acc_norm
|
| 42 |
+
value: 31.17
|
| 43 |
+
name: normalized accuracy
|
| 44 |
+
source:
|
| 45 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
|
| 46 |
+
name: Open LLM Leaderboard
|
| 47 |
+
- task:
|
| 48 |
+
type: text-generation
|
| 49 |
+
name: Text Generation
|
| 50 |
+
dataset:
|
| 51 |
+
name: MMLU (5-Shot)
|
| 52 |
+
type: cais/mmlu
|
| 53 |
+
config: all
|
| 54 |
+
split: test
|
| 55 |
+
args:
|
| 56 |
+
num_few_shot: 5
|
| 57 |
+
metrics:
|
| 58 |
+
- type: acc
|
| 59 |
+
value: 23.12
|
| 60 |
+
name: accuracy
|
| 61 |
+
source:
|
| 62 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
|
| 63 |
+
name: Open LLM Leaderboard
|
| 64 |
+
- task:
|
| 65 |
+
type: text-generation
|
| 66 |
+
name: Text Generation
|
| 67 |
+
dataset:
|
| 68 |
+
name: TruthfulQA (0-shot)
|
| 69 |
+
type: truthful_qa
|
| 70 |
+
config: multiple_choice
|
| 71 |
+
split: validation
|
| 72 |
+
args:
|
| 73 |
+
num_few_shot: 0
|
| 74 |
+
metrics:
|
| 75 |
+
- type: mc2
|
| 76 |
+
value: 0.0
|
| 77 |
+
source:
|
| 78 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
|
| 79 |
+
name: Open LLM Leaderboard
|
| 80 |
+
- task:
|
| 81 |
+
type: text-generation
|
| 82 |
+
name: Text Generation
|
| 83 |
+
dataset:
|
| 84 |
+
name: Winogrande (5-shot)
|
| 85 |
+
type: winogrande
|
| 86 |
+
config: winogrande_xl
|
| 87 |
+
split: validation
|
| 88 |
+
args:
|
| 89 |
+
num_few_shot: 5
|
| 90 |
+
metrics:
|
| 91 |
+
- type: acc
|
| 92 |
+
value: 60.3
|
| 93 |
+
name: accuracy
|
| 94 |
+
source:
|
| 95 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
|
| 96 |
+
name: Open LLM Leaderboard
|
| 97 |
+
- task:
|
| 98 |
+
type: text-generation
|
| 99 |
+
name: Text Generation
|
| 100 |
+
dataset:
|
| 101 |
+
name: GSM8k (5-shot)
|
| 102 |
+
type: gsm8k
|
| 103 |
+
config: main
|
| 104 |
+
split: test
|
| 105 |
+
args:
|
| 106 |
+
num_few_shot: 5
|
| 107 |
+
metrics:
|
| 108 |
+
- type: acc
|
| 109 |
+
value: 0.0
|
| 110 |
+
name: accuracy
|
| 111 |
+
source:
|
| 112 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=LimYeri/CodeMind-Gemma-7B-QLoRA-4bit
|
| 113 |
+
name: Open LLM Leaderboard
|
| 114 |
---
|
| 115 |
|
| 116 |
# CodeMind
|
|
|
|
| 212 |
## Ethical Considerations
|
| 213 |
- The model should be used as a supportive tool for learning and problem-solving, not as a substitute for human expertise and critical thinking.
|
| 214 |
- Users should be aware that the model's responses are generated based on patterns in the training data and may not always be accurate, complete, or up to date.
|
| 215 |
+
- The model should not be relied upon for making critical decisions or solving real-world problems without thorough validation and testing.
|
| 216 |
+
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 217 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_LimYeri__CodeMind-Gemma-7B-QLoRA-4bit)
|
| 218 |
+
|
| 219 |
+
| Metric |Value|
|
| 220 |
+
|---------------------------------|----:|
|
| 221 |
+
|Avg. |22.97|
|
| 222 |
+
|AI2 Reasoning Challenge (25-Shot)|23.21|
|
| 223 |
+
|HellaSwag (10-Shot) |31.17|
|
| 224 |
+
|MMLU (5-Shot) |23.12|
|
| 225 |
+
|TruthfulQA (0-shot) | 0.00|
|
| 226 |
+
|Winogrande (5-shot) |60.30|
|
| 227 |
+
|GSM8k (5-shot) | 0.00|
|
| 228 |
+
|