Instructions to use Multi-Domain-Expert-Learning/given-mpt-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Multi-Domain-Expert-Learning/given-mpt-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Multi-Domain-Expert-Learning/given-mpt-7b", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Multi-Domain-Expert-Learning/given-mpt-7b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Multi-Domain-Expert-Learning/given-mpt-7b", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Multi-Domain-Expert-Learning/given-mpt-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Multi-Domain-Expert-Learning/given-mpt-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Multi-Domain-Expert-Learning/given-mpt-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Multi-Domain-Expert-Learning/given-mpt-7b
- SGLang
How to use Multi-Domain-Expert-Learning/given-mpt-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 "Multi-Domain-Expert-Learning/given-mpt-7b" \ --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": "Multi-Domain-Expert-Learning/given-mpt-7b", "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 "Multi-Domain-Expert-Learning/given-mpt-7b" \ --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": "Multi-Domain-Expert-Learning/given-mpt-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Multi-Domain-Expert-Learning/given-mpt-7b with Docker Model Runner:
docker model run hf.co/Multi-Domain-Expert-Learning/given-mpt-7b
Ontocord.AI commited on
Commit ·
f28a2f8
1
Parent(s): 067de39
Upload MPTForCausalLM
Browse files- config.json +4 -3
- generation_config.json +1 -1
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"MPTForCausalLM"
|
| 4 |
],
|
|
@@ -15,8 +16,8 @@
|
|
| 15 |
"softmax_scale": null
|
| 16 |
},
|
| 17 |
"auto_map": {
|
| 18 |
-
"AutoConfig": "configuration_mpt.MPTConfig",
|
| 19 |
-
"AutoModelForCausalLM": "modeling_mpt.MPTForCausalLM"
|
| 20 |
},
|
| 21 |
"d_model": 4096,
|
| 22 |
"emb_pdrop": 0,
|
|
@@ -45,7 +46,7 @@
|
|
| 45 |
"resid_pdrop": 0,
|
| 46 |
"tokenizer_name": "EleutherAI/gpt-neox-20b",
|
| 47 |
"torch_dtype": "bfloat16",
|
| 48 |
-
"transformers_version": "4.
|
| 49 |
"use_cache": false,
|
| 50 |
"verbose": 0,
|
| 51 |
"vocab_size": 50432
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "TehVenom/MPT-7b-WizardLM_Uncensored-Storywriter-Merge",
|
| 3 |
"architectures": [
|
| 4 |
"MPTForCausalLM"
|
| 5 |
],
|
|
|
|
| 16 |
"softmax_scale": null
|
| 17 |
},
|
| 18 |
"auto_map": {
|
| 19 |
+
"AutoConfig": "TehVenom/MPT-7b-WizardLM_Uncensored-Storywriter-Merge--configuration_mpt.MPTConfig",
|
| 20 |
+
"AutoModelForCausalLM": "TehVenom/MPT-7b-WizardLM_Uncensored-Storywriter-Merge--modeling_mpt.MPTForCausalLM"
|
| 21 |
},
|
| 22 |
"d_model": 4096,
|
| 23 |
"emb_pdrop": 0,
|
|
|
|
| 46 |
"resid_pdrop": 0,
|
| 47 |
"tokenizer_name": "EleutherAI/gpt-neox-20b",
|
| 48 |
"torch_dtype": "bfloat16",
|
| 49 |
+
"transformers_version": "4.30.1",
|
| 50 |
"use_cache": false,
|
| 51 |
"verbose": 0,
|
| 52 |
"vocab_size": 50432
|
generation_config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
-
"transformers_version": "4.
|
| 4 |
"use_cache": false
|
| 5 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
+
"transformers_version": "4.30.1",
|
| 4 |
"use_cache": false
|
| 5 |
}
|