Text Generation
Transformers
PyTorch
Safetensors
mixtral
mteb
conversational
custom_code
Eval Results (legacy)
text-generation-inference
Instructions to use GritLM/GritLM-8x7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GritLM/GritLM-8x7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GritLM/GritLM-8x7B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GritLM/GritLM-8x7B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("GritLM/GritLM-8x7B", trust_remote_code=True, device_map="auto") 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 GritLM/GritLM-8x7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GritLM/GritLM-8x7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GritLM/GritLM-8x7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GritLM/GritLM-8x7B
- SGLang
How to use GritLM/GritLM-8x7B 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 "GritLM/GritLM-8x7B" \ --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": "GritLM/GritLM-8x7B", "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 "GritLM/GritLM-8x7B" \ --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": "GritLM/GritLM-8x7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GritLM/GritLM-8x7B with Docker Model Runner:
docker model run hf.co/GritLM/GritLM-8x7B
Added base_model metadata
Browse files
README.md
CHANGED
|
@@ -1200,7 +1200,7 @@ model-index:
|
|
| 1200 |
- type: map_at_5
|
| 1201 |
value: 18.116
|
| 1202 |
- type: mrr_at_1
|
| 1203 |
-
value: 74
|
| 1204 |
- type: mrr_at_10
|
| 1205 |
value: 80.047
|
| 1206 |
- type: mrr_at_100
|
|
@@ -1224,7 +1224,7 @@ model-index:
|
|
| 1224 |
- type: ndcg_at_5
|
| 1225 |
value: 49.016
|
| 1226 |
- type: precision_at_1
|
| 1227 |
-
value: 74
|
| 1228 |
- type: precision_at_10
|
| 1229 |
value: 37.325
|
| 1230 |
- type: precision_at_100
|
|
@@ -2194,7 +2194,7 @@ model-index:
|
|
| 2194 |
- type: precision_at_3
|
| 2195 |
value: 28.111000000000004
|
| 2196 |
- type: precision_at_5
|
| 2197 |
-
value: 19
|
| 2198 |
- type: recall_at_1
|
| 2199 |
value: 60.494
|
| 2200 |
- type: recall_at_10
|
|
@@ -2202,7 +2202,7 @@ model-index:
|
|
| 2202 |
- type: recall_at_100
|
| 2203 |
value: 97.333
|
| 2204 |
- type: recall_at_1000
|
| 2205 |
-
value: 100
|
| 2206 |
- type: recall_at_3
|
| 2207 |
value: 77.644
|
| 2208 |
- type: recall_at_5
|
|
@@ -2336,7 +2336,7 @@ model-index:
|
|
| 2336 |
- type: map_at_5
|
| 2337 |
value: 1.091
|
| 2338 |
- type: mrr_at_1
|
| 2339 |
-
value: 88
|
| 2340 |
- type: mrr_at_10
|
| 2341 |
value: 93.067
|
| 2342 |
- type: mrr_at_100
|
|
@@ -2348,7 +2348,7 @@ model-index:
|
|
| 2348 |
- type: mrr_at_5
|
| 2349 |
value: 93.067
|
| 2350 |
- type: ndcg_at_1
|
| 2351 |
-
value: 84
|
| 2352 |
- type: ndcg_at_10
|
| 2353 |
value: 81.072
|
| 2354 |
- type: ndcg_at_100
|
|
@@ -2360,7 +2360,7 @@ model-index:
|
|
| 2360 |
- type: ndcg_at_5
|
| 2361 |
value: 84.10499999999999
|
| 2362 |
- type: precision_at_1
|
| 2363 |
-
value: 88
|
| 2364 |
- type: precision_at_10
|
| 2365 |
value: 83.39999999999999
|
| 2366 |
- type: precision_at_100
|
|
@@ -2368,7 +2368,7 @@ model-index:
|
|
| 2368 |
- type: precision_at_1000
|
| 2369 |
value: 24.622
|
| 2370 |
- type: precision_at_3
|
| 2371 |
-
value: 88
|
| 2372 |
- type: precision_at_5
|
| 2373 |
value: 87.2
|
| 2374 |
- type: recall_at_1
|
|
@@ -2421,7 +2421,7 @@ model-index:
|
|
| 2421 |
- type: ndcg_at_10
|
| 2422 |
value: 27.968
|
| 2423 |
- type: ndcg_at_100
|
| 2424 |
-
value: 39
|
| 2425 |
- type: ndcg_at_1000
|
| 2426 |
value: 50.292
|
| 2427 |
- type: ndcg_at_3
|
|
@@ -2601,6 +2601,8 @@ model-index:
|
|
| 2601 |
value: 86.45196525133669
|
| 2602 |
- type: max_f1
|
| 2603 |
value: 79.25172592977508
|
|
|
|
|
|
|
| 2604 |
---
|
| 2605 |
|
| 2606 |
# Model Summary
|
|
|
|
| 1200 |
- type: map_at_5
|
| 1201 |
value: 18.116
|
| 1202 |
- type: mrr_at_1
|
| 1203 |
+
value: 74
|
| 1204 |
- type: mrr_at_10
|
| 1205 |
value: 80.047
|
| 1206 |
- type: mrr_at_100
|
|
|
|
| 1224 |
- type: ndcg_at_5
|
| 1225 |
value: 49.016
|
| 1226 |
- type: precision_at_1
|
| 1227 |
+
value: 74
|
| 1228 |
- type: precision_at_10
|
| 1229 |
value: 37.325
|
| 1230 |
- type: precision_at_100
|
|
|
|
| 2194 |
- type: precision_at_3
|
| 2195 |
value: 28.111000000000004
|
| 2196 |
- type: precision_at_5
|
| 2197 |
+
value: 19
|
| 2198 |
- type: recall_at_1
|
| 2199 |
value: 60.494
|
| 2200 |
- type: recall_at_10
|
|
|
|
| 2202 |
- type: recall_at_100
|
| 2203 |
value: 97.333
|
| 2204 |
- type: recall_at_1000
|
| 2205 |
+
value: 100
|
| 2206 |
- type: recall_at_3
|
| 2207 |
value: 77.644
|
| 2208 |
- type: recall_at_5
|
|
|
|
| 2336 |
- type: map_at_5
|
| 2337 |
value: 1.091
|
| 2338 |
- type: mrr_at_1
|
| 2339 |
+
value: 88
|
| 2340 |
- type: mrr_at_10
|
| 2341 |
value: 93.067
|
| 2342 |
- type: mrr_at_100
|
|
|
|
| 2348 |
- type: mrr_at_5
|
| 2349 |
value: 93.067
|
| 2350 |
- type: ndcg_at_1
|
| 2351 |
+
value: 84
|
| 2352 |
- type: ndcg_at_10
|
| 2353 |
value: 81.072
|
| 2354 |
- type: ndcg_at_100
|
|
|
|
| 2360 |
- type: ndcg_at_5
|
| 2361 |
value: 84.10499999999999
|
| 2362 |
- type: precision_at_1
|
| 2363 |
+
value: 88
|
| 2364 |
- type: precision_at_10
|
| 2365 |
value: 83.39999999999999
|
| 2366 |
- type: precision_at_100
|
|
|
|
| 2368 |
- type: precision_at_1000
|
| 2369 |
value: 24.622
|
| 2370 |
- type: precision_at_3
|
| 2371 |
+
value: 88
|
| 2372 |
- type: precision_at_5
|
| 2373 |
value: 87.2
|
| 2374 |
- type: recall_at_1
|
|
|
|
| 2421 |
- type: ndcg_at_10
|
| 2422 |
value: 27.968
|
| 2423 |
- type: ndcg_at_100
|
| 2424 |
+
value: 39
|
| 2425 |
- type: ndcg_at_1000
|
| 2426 |
value: 50.292
|
| 2427 |
- type: ndcg_at_3
|
|
|
|
| 2601 |
value: 86.45196525133669
|
| 2602 |
- type: max_f1
|
| 2603 |
value: 79.25172592977508
|
| 2604 |
+
base_model:
|
| 2605 |
+
- mistralai/Mixtral-8x7B-Instruct-v0.1
|
| 2606 |
---
|
| 2607 |
|
| 2608 |
# Model Summary
|