Text Generation
Transformers
Safetensors
dbrx_converted
dbrx
4bit
gptq
gptqmodel
conversational
custom_code
Instructions to use ModelCloud/dbrx-instruct-converted-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ModelCloud/dbrx-instruct-converted-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ModelCloud/dbrx-instruct-converted-v2", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ModelCloud/dbrx-instruct-converted-v2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ModelCloud/dbrx-instruct-converted-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModelCloud/dbrx-instruct-converted-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/dbrx-instruct-converted-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ModelCloud/dbrx-instruct-converted-v2
- SGLang
How to use ModelCloud/dbrx-instruct-converted-v2 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 "ModelCloud/dbrx-instruct-converted-v2" \ --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": "ModelCloud/dbrx-instruct-converted-v2", "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 "ModelCloud/dbrx-instruct-converted-v2" \ --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": "ModelCloud/dbrx-instruct-converted-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ModelCloud/dbrx-instruct-converted-v2 with Docker Model Runner:
docker model run hf.co/ModelCloud/dbrx-instruct-converted-v2
Commit History
-
Use GPT2Tokenizer instead of Tiktokenizer
LRLcc7aae3
-
Upload folder using huggingface_hub (#2)
Verified signature- 9768ebe43b80c11e575db1d951572af2bb45474ede807ad71ff41445685fee75 (76b5754299adf4528ce0e3120d823ecd6d54bb53) - 44e5da5ca204044dbfb00cb3f9fa98a490e23d0f03db129f6b218d6411c04ff7 (7560eb43c3a35d3d8e2d91bac882a1669a005df2) - f982a90e8b1bd08203b3a06efc3d56cb6f4b9b15597961014c29c8fb3280bbf5 (487be7a867615e33e374668154e834c8dff654f0) - e6629b0df4bd0297e9c54b115b77ddabda30f8b1e2599a8512ba501e3c02032c (ead3f331632462ecdcee5157c39773b0c5d2b510) - 319009fdee789e4dc2ef9ade44fdde27bb7f8714faff7ed4bb88fc80a92c255a (fd20877f45176dcce598e85ded3cd50dd4af167a) - 2038ed65c67f787b0f554d222d5f5071e00077de44bbbcfcabd9a7a8cbf1b61c (8c939d5cc76da5d410b3888e7977e21cf0a18eaf) - 2db0cbc992f5e8d40ff6fc8b12c12d27c33f086406fe9531978269bf519bb387 (e3113a88b111701211153d5edfb9344bb44f0ae0) - 47acf2e55b2e182c49564b82c51e9aadc5e7152371113e35bcb706ac38313984 (1c6cfeb1d8f3b4321f55fbb05c60cba38290812b) - b17a0d2943e6a7e91975da811fc09702a58e9988fb66862aaad53c715448c6da (969b29dcfc0613ff210eedeb6c8bccb0faf470d1) - 1050c18c…28b96cb
-
initial commit
Verified signature6b14ea3