Instructions to use normalcomputing/extended-mind-mpt-7b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use normalcomputing/extended-mind-mpt-7b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="normalcomputing/extended-mind-mpt-7b-chat", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("normalcomputing/extended-mind-mpt-7b-chat", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use normalcomputing/extended-mind-mpt-7b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "normalcomputing/extended-mind-mpt-7b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "normalcomputing/extended-mind-mpt-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/normalcomputing/extended-mind-mpt-7b-chat
- SGLang
How to use normalcomputing/extended-mind-mpt-7b-chat 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 "normalcomputing/extended-mind-mpt-7b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "normalcomputing/extended-mind-mpt-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "normalcomputing/extended-mind-mpt-7b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "normalcomputing/extended-mind-mpt-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use normalcomputing/extended-mind-mpt-7b-chat with Docker Model Runner:
docker model run hf.co/normalcomputing/extended-mind-mpt-7b-chat
Update config.json
Browse files- config.json +6 -6
config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
-
"
|
| 5 |
],
|
| 6 |
"attn_config": {
|
| 7 |
"alibi": true,
|
|
@@ -21,8 +21,8 @@
|
|
| 21 |
"use_active_externalism": true
|
| 22 |
},
|
| 23 |
"auto_map": {
|
| 24 |
-
"AutoConfig": "configuration.
|
| 25 |
-
"AutoModelForCausalLM": "
|
| 26 |
},
|
| 27 |
"d_model": 4096,
|
| 28 |
"emb_pdrop": 0,
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
"resid_pdrop": 0,
|
| 53 |
"tokenizer_name": "sam-mosaic/gpt-neox-20b-chatml",
|
| 54 |
"torch_dtype": "float32",
|
| 55 |
-
"transformers_version": "4.33.
|
| 56 |
"use_active_externalism_by_layer": [
|
| 57 |
true,
|
| 58 |
true,
|
|
@@ -87,7 +87,7 @@
|
|
| 87 |
true,
|
| 88 |
true
|
| 89 |
],
|
| 90 |
-
"use_cache":
|
| 91 |
"verbose": 0,
|
| 92 |
"vocab_size": 50432
|
| 93 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "normalcomputing/extended-mind-mpt-7b-chat",
|
| 3 |
"architectures": [
|
| 4 |
+
"ExtendedMptForCausalLM"
|
| 5 |
],
|
| 6 |
"attn_config": {
|
| 7 |
"alibi": true,
|
|
|
|
| 21 |
"use_active_externalism": true
|
| 22 |
},
|
| 23 |
"auto_map": {
|
| 24 |
+
"AutoConfig": "configuration.ExtendedMptConfig",
|
| 25 |
+
"AutoModelForCausalLM": "modeling.ExtendedMptForCausalLM"
|
| 26 |
},
|
| 27 |
"d_model": 4096,
|
| 28 |
"emb_pdrop": 0,
|
|
|
|
| 52 |
"resid_pdrop": 0,
|
| 53 |
"tokenizer_name": "sam-mosaic/gpt-neox-20b-chatml",
|
| 54 |
"torch_dtype": "float32",
|
| 55 |
+
"transformers_version": "4.33.0",
|
| 56 |
"use_active_externalism_by_layer": [
|
| 57 |
true,
|
| 58 |
true,
|
|
|
|
| 87 |
true,
|
| 88 |
true
|
| 89 |
],
|
| 90 |
+
"use_cache": true,
|
| 91 |
"verbose": 0,
|
| 92 |
"vocab_size": 50432
|
| 93 |
}
|