Text Generation
Transformers
PyTorch
Safetensors
mistral
mteb
conversational
custom_code
Eval Results (legacy)
Eval Results
text-generation-inference
Instructions to use GritLM/GritLM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GritLM/GritLM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GritLM/GritLM-7B", 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-7B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("GritLM/GritLM-7B", trust_remote_code=True) 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 GritLM/GritLM-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GritLM/GritLM-7B" # 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-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GritLM/GritLM-7B
- SGLang
How to use GritLM/GritLM-7B 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-7B" \ --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-7B", "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-7B" \ --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-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GritLM/GritLM-7B with Docker Model Runner:
docker model run hf.co/GritLM/GritLM-7B
Added base_model metadata
#11
by rdeban - opened
README.md
CHANGED
|
@@ -510,7 +510,7 @@ model-index:
|
|
| 510 |
- type: map_at_5
|
| 511 |
value: 29.767
|
| 512 |
- type: mrr_at_1
|
| 513 |
-
value: 25
|
| 514 |
- type: mrr_at_10
|
| 515 |
value: 36.131
|
| 516 |
- type: mrr_at_100
|
|
@@ -522,7 +522,7 @@ model-index:
|
|
| 522 |
- type: mrr_at_5
|
| 523 |
value: 35.143
|
| 524 |
- type: ndcg_at_1
|
| 525 |
-
value: 25
|
| 526 |
- type: ndcg_at_10
|
| 527 |
value: 37.478
|
| 528 |
- type: ndcg_at_100
|
|
@@ -534,7 +534,7 @@ model-index:
|
|
| 534 |
- type: ndcg_at_5
|
| 535 |
value: 34.821999999999996
|
| 536 |
- type: precision_at_1
|
| 537 |
-
value: 25
|
| 538 |
- type: precision_at_10
|
| 539 |
value: 7.188999999999999
|
| 540 |
- type: precision_at_100
|
|
@@ -2200,9 +2200,9 @@ model-index:
|
|
| 2200 |
- type: recall_at_10
|
| 2201 |
value: 91.822
|
| 2202 |
- type: recall_at_100
|
| 2203 |
-
value: 97
|
| 2204 |
- type: recall_at_1000
|
| 2205 |
-
value: 100
|
| 2206 |
- type: recall_at_3
|
| 2207 |
value: 78.878
|
| 2208 |
- type: recall_at_5
|
|
@@ -2245,7 +2245,7 @@ model-index:
|
|
| 2245 |
- type: euclidean_precision
|
| 2246 |
value: 88.64864864864866
|
| 2247 |
- type: euclidean_recall
|
| 2248 |
-
value: 82
|
| 2249 |
- type: manhattan_accuracy
|
| 2250 |
value: 99.73267326732673
|
| 2251 |
- type: manhattan_ap
|
|
@@ -2255,7 +2255,7 @@ model-index:
|
|
| 2255 |
- type: manhattan_precision
|
| 2256 |
value: 87.86610878661088
|
| 2257 |
- type: manhattan_recall
|
| 2258 |
-
value: 84
|
| 2259 |
- type: max_accuracy
|
| 2260 |
value: 99.73267326732673
|
| 2261 |
- type: max_ap
|
|
@@ -2334,9 +2334,9 @@ model-index:
|
|
| 2334 |
- type: map_at_3
|
| 2335 |
value: 0.636
|
| 2336 |
- type: map_at_5
|
| 2337 |
-
value: 1
|
| 2338 |
- type: mrr_at_1
|
| 2339 |
-
value: 88
|
| 2340 |
- type: mrr_at_10
|
| 2341 |
value: 93.667
|
| 2342 |
- type: mrr_at_100
|
|
@@ -2348,7 +2348,7 @@ model-index:
|
|
| 2348 |
- type: mrr_at_5
|
| 2349 |
value: 93.667
|
| 2350 |
- type: ndcg_at_1
|
| 2351 |
-
value: 85
|
| 2352 |
- type: ndcg_at_10
|
| 2353 |
value: 74.798
|
| 2354 |
- type: ndcg_at_100
|
|
@@ -2360,9 +2360,9 @@ model-index:
|
|
| 2360 |
- type: ndcg_at_5
|
| 2361 |
value: 77.319
|
| 2362 |
- type: precision_at_1
|
| 2363 |
-
value: 88
|
| 2364 |
- type: precision_at_10
|
| 2365 |
-
value: 78
|
| 2366 |
- type: precision_at_100
|
| 2367 |
value: 7.8
|
| 2368 |
- type: precision_at_1000
|
|
@@ -2601,6 +2601,8 @@ model-index:
|
|
| 2601 |
value: 87.47814292587448
|
| 2602 |
- type: max_f1
|
| 2603 |
value: 80.15461150280949
|
|
|
|
|
|
|
| 2604 |
---
|
| 2605 |
|
| 2606 |
# Model Summary
|
|
|
|
| 510 |
- type: map_at_5
|
| 511 |
value: 29.767
|
| 512 |
- type: mrr_at_1
|
| 513 |
+
value: 25
|
| 514 |
- type: mrr_at_10
|
| 515 |
value: 36.131
|
| 516 |
- type: mrr_at_100
|
|
|
|
| 522 |
- type: mrr_at_5
|
| 523 |
value: 35.143
|
| 524 |
- type: ndcg_at_1
|
| 525 |
+
value: 25
|
| 526 |
- type: ndcg_at_10
|
| 527 |
value: 37.478
|
| 528 |
- type: ndcg_at_100
|
|
|
|
| 534 |
- type: ndcg_at_5
|
| 535 |
value: 34.821999999999996
|
| 536 |
- type: precision_at_1
|
| 537 |
+
value: 25
|
| 538 |
- type: precision_at_10
|
| 539 |
value: 7.188999999999999
|
| 540 |
- type: precision_at_100
|
|
|
|
| 2200 |
- type: recall_at_10
|
| 2201 |
value: 91.822
|
| 2202 |
- type: recall_at_100
|
| 2203 |
+
value: 97
|
| 2204 |
- type: recall_at_1000
|
| 2205 |
+
value: 100
|
| 2206 |
- type: recall_at_3
|
| 2207 |
value: 78.878
|
| 2208 |
- type: recall_at_5
|
|
|
|
| 2245 |
- type: euclidean_precision
|
| 2246 |
value: 88.64864864864866
|
| 2247 |
- type: euclidean_recall
|
| 2248 |
+
value: 82
|
| 2249 |
- type: manhattan_accuracy
|
| 2250 |
value: 99.73267326732673
|
| 2251 |
- type: manhattan_ap
|
|
|
|
| 2255 |
- type: manhattan_precision
|
| 2256 |
value: 87.86610878661088
|
| 2257 |
- type: manhattan_recall
|
| 2258 |
+
value: 84
|
| 2259 |
- type: max_accuracy
|
| 2260 |
value: 99.73267326732673
|
| 2261 |
- type: max_ap
|
|
|
|
| 2334 |
- type: map_at_3
|
| 2335 |
value: 0.636
|
| 2336 |
- type: map_at_5
|
| 2337 |
+
value: 1
|
| 2338 |
- type: mrr_at_1
|
| 2339 |
+
value: 88
|
| 2340 |
- type: mrr_at_10
|
| 2341 |
value: 93.667
|
| 2342 |
- type: mrr_at_100
|
|
|
|
| 2348 |
- type: mrr_at_5
|
| 2349 |
value: 93.667
|
| 2350 |
- type: ndcg_at_1
|
| 2351 |
+
value: 85
|
| 2352 |
- type: ndcg_at_10
|
| 2353 |
value: 74.798
|
| 2354 |
- type: ndcg_at_100
|
|
|
|
| 2360 |
- type: ndcg_at_5
|
| 2361 |
value: 77.319
|
| 2362 |
- type: precision_at_1
|
| 2363 |
+
value: 88
|
| 2364 |
- type: precision_at_10
|
| 2365 |
+
value: 78
|
| 2366 |
- type: precision_at_100
|
| 2367 |
value: 7.8
|
| 2368 |
- type: precision_at_1000
|
|
|
|
| 2601 |
value: 87.47814292587448
|
| 2602 |
- type: max_f1
|
| 2603 |
value: 80.15461150280949
|
| 2604 |
+
base_model:
|
| 2605 |
+
- mistralai/Mistral-7B-v0.1
|
| 2606 |
---
|
| 2607 |
|
| 2608 |
# Model Summary
|