Instructions to use CodingWarrior33/tryModel-mpt1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CodingWarrior33/tryModel-mpt1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CodingWarrior33/tryModel-mpt1", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CodingWarrior33/tryModel-mpt1", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("CodingWarrior33/tryModel-mpt1", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use CodingWarrior33/tryModel-mpt1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CodingWarrior33/tryModel-mpt1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodingWarrior33/tryModel-mpt1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CodingWarrior33/tryModel-mpt1
- SGLang
How to use CodingWarrior33/tryModel-mpt1 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 "CodingWarrior33/tryModel-mpt1" \ --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": "CodingWarrior33/tryModel-mpt1", "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 "CodingWarrior33/tryModel-mpt1" \ --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": "CodingWarrior33/tryModel-mpt1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CodingWarrior33/tryModel-mpt1 with Docker Model Runner:
docker model run hf.co/CodingWarrior33/tryModel-mpt1
Commit ·
0a99a18
1
Parent(s): ebd4f35
Upload MptForCausalLM
Browse files- config.json +46 -0
- generation_config.json +6 -0
- pytorch_model.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "mosaicml/mpt-7b",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"MptForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attn_config": {
|
| 7 |
+
"model_type": ""
|
| 8 |
+
},
|
| 9 |
+
"auto_map": {
|
| 10 |
+
"AutoConfig": "mosaicml/mpt-7b--configuration_mpt.MPTConfig",
|
| 11 |
+
"AutoModelForCausalLM": "mosaicml/mpt-7b--modeling_mpt.MPTForCausalLM"
|
| 12 |
+
},
|
| 13 |
+
"d_model": 4096,
|
| 14 |
+
"emb_pdrop": 0,
|
| 15 |
+
"embedding_fraction": 1.0,
|
| 16 |
+
"expansion_ratio": 4,
|
| 17 |
+
"init_config": {
|
| 18 |
+
"emb_init_std": null,
|
| 19 |
+
"emb_init_uniform_lim": null,
|
| 20 |
+
"fan_mode": "fan_in",
|
| 21 |
+
"init_div_is_residual": true,
|
| 22 |
+
"init_gain": 0,
|
| 23 |
+
"init_nonlinearity": "relu",
|
| 24 |
+
"init_std": 0.02,
|
| 25 |
+
"name": "kaiming_normal_",
|
| 26 |
+
"verbose": 0
|
| 27 |
+
},
|
| 28 |
+
"init_device": "cpu",
|
| 29 |
+
"initializer_range": 0.02,
|
| 30 |
+
"layer_norm_epsilon": 1e-05,
|
| 31 |
+
"learned_pos_emb": true,
|
| 32 |
+
"logit_scale": null,
|
| 33 |
+
"max_seq_len": 2048,
|
| 34 |
+
"model_type": "mpt",
|
| 35 |
+
"n_heads": 32,
|
| 36 |
+
"n_layers": 32,
|
| 37 |
+
"no_bias": true,
|
| 38 |
+
"norm_type": "low_precision_layernorm",
|
| 39 |
+
"resid_pdrop": 0,
|
| 40 |
+
"tokenizer_name": "EleutherAI/gpt-neox-20b",
|
| 41 |
+
"torch_dtype": "float16",
|
| 42 |
+
"transformers_version": "4.34.1",
|
| 43 |
+
"use_cache": false,
|
| 44 |
+
"verbose": 0,
|
| 45 |
+
"vocab_size": 50432
|
| 46 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": 0,
|
| 4 |
+
"transformers_version": "4.34.1",
|
| 5 |
+
"use_cache": false
|
| 6 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62f6551bf22c180ff199f45ab3ac77aed8709aec0742ce0e390984e053b35d3d
|
| 3 |
+
size 13298640518
|