Instructions to use RedHatAI/mpt-7b-gsm8k-quant-ds with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/mpt-7b-gsm8k-quant-ds with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedHatAI/mpt-7b-gsm8k-quant-ds", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RedHatAI/mpt-7b-gsm8k-quant-ds", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("RedHatAI/mpt-7b-gsm8k-quant-ds", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RedHatAI/mpt-7b-gsm8k-quant-ds with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/mpt-7b-gsm8k-quant-ds" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/mpt-7b-gsm8k-quant-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RedHatAI/mpt-7b-gsm8k-quant-ds
- SGLang
How to use RedHatAI/mpt-7b-gsm8k-quant-ds 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 "RedHatAI/mpt-7b-gsm8k-quant-ds" \ --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": "RedHatAI/mpt-7b-gsm8k-quant-ds", "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 "RedHatAI/mpt-7b-gsm8k-quant-ds" \ --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": "RedHatAI/mpt-7b-gsm8k-quant-ds", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RedHatAI/mpt-7b-gsm8k-quant-ds with Docker Model Runner:
docker model run hf.co/RedHatAI/mpt-7b-gsm8k-quant-ds
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- config.json +53 -0
- model-orig.onnx +3 -0
- model.data +3 -0
- model.onnx +3 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer_config.json +9 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
model.data filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/nfs/scistore14/alistgrp/ekurtic/github/eldarkurtic/llm-foundry/scripts/train/output_dir/gsm8k/mpt_7b_dense_teacher/hf_ckpt",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"MPTForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attn_config": {
|
| 7 |
+
"alibi": true,
|
| 8 |
+
"alibi_bias_max": 8,
|
| 9 |
+
"attn_impl": "torch",
|
| 10 |
+
"attn_pdrop": 0,
|
| 11 |
+
"attn_type": "multihead_attention",
|
| 12 |
+
"attn_uses_sequence_id": false,
|
| 13 |
+
"clip_qkv": null,
|
| 14 |
+
"prefix_lm": false,
|
| 15 |
+
"qk_ln": false,
|
| 16 |
+
"softmax_scale": null
|
| 17 |
+
},
|
| 18 |
+
"auto_map": {
|
| 19 |
+
"AutoConfig": "configuration_mpt.MPTConfig",
|
| 20 |
+
"AutoModelForCausalLM": "modeling_mpt.MPTForCausalLM"
|
| 21 |
+
},
|
| 22 |
+
"d_model": 4096,
|
| 23 |
+
"emb_pdrop": 0,
|
| 24 |
+
"embedding_fraction": 1.0,
|
| 25 |
+
"expansion_ratio": 4,
|
| 26 |
+
"init_config": {
|
| 27 |
+
"emb_init_std": null,
|
| 28 |
+
"emb_init_uniform_lim": null,
|
| 29 |
+
"fan_mode": "fan_in",
|
| 30 |
+
"init_div_is_residual": true,
|
| 31 |
+
"init_gain": 0,
|
| 32 |
+
"init_nonlinearity": "relu",
|
| 33 |
+
"init_std": 0.02,
|
| 34 |
+
"name": "kaiming_normal_",
|
| 35 |
+
"verbose": 0
|
| 36 |
+
},
|
| 37 |
+
"init_device": "cpu",
|
| 38 |
+
"learned_pos_emb": true,
|
| 39 |
+
"logit_scale": null,
|
| 40 |
+
"max_seq_len": 2048,
|
| 41 |
+
"model_type": "mpt",
|
| 42 |
+
"n_heads": 32,
|
| 43 |
+
"n_layers": 32,
|
| 44 |
+
"no_bias": true,
|
| 45 |
+
"norm_type": "low_precision_layernorm",
|
| 46 |
+
"resid_pdrop": 0,
|
| 47 |
+
"tokenizer_name": "EleutherAI/gpt-neox-20b",
|
| 48 |
+
"torch_dtype": "float32",
|
| 49 |
+
"transformers_version": "4.32.0.dev0",
|
| 50 |
+
"use_cache": false,
|
| 51 |
+
"verbose": 0,
|
| 52 |
+
"vocab_size": 50432
|
| 53 |
+
}
|
model-orig.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:abddf22876a496db3ea90b4facbfbdb9b7e8d54e5e04db6d06c1dd4beae0b171
|
| 3 |
+
size 1479554
|
model.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c125c72a533f7fabb6273c6ca9049f55b3d524502ed8594378cee7cd812dea2
|
| 3 |
+
size 6856916992
|
model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4705de6ee9876b7b77d2dbb5db6636e7649f489d51b5b1a000f28d44eaa9c852
|
| 3 |
+
size 1317581
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|endoftext|>",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"pad_token": "<|endoftext|>",
|
| 5 |
+
"unk_token": "<|endoftext|>"
|
| 6 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"bos_token": "<|endoftext|>",
|
| 4 |
+
"clean_up_tokenization_spaces": true,
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"model_max_length": 512,
|
| 7 |
+
"tokenizer_class": "GPTNeoXTokenizer",
|
| 8 |
+
"unk_token": "<|endoftext|>"
|
| 9 |
+
}
|