Text Generation
Transformers
Safetensors
English
qwen2
chat
conversational
text-generation-inference
Instructions to use GAIR/daVinci-Dev-32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GAIR/daVinci-Dev-32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GAIR/daVinci-Dev-32B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GAIR/daVinci-Dev-32B") model = AutoModelForCausalLM.from_pretrained("GAIR/daVinci-Dev-32B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GAIR/daVinci-Dev-32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GAIR/daVinci-Dev-32B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAIR/daVinci-Dev-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GAIR/daVinci-Dev-32B
- SGLang
How to use GAIR/daVinci-Dev-32B 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 "GAIR/daVinci-Dev-32B" \ --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": "GAIR/daVinci-Dev-32B", "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 "GAIR/daVinci-Dev-32B" \ --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": "GAIR/daVinci-Dev-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GAIR/daVinci-Dev-32B with Docker Model Runner:
docker model run hf.co/GAIR/daVinci-Dev-32B
Commit History
-
Upload README.md with huggingface_hub
Verified signature25134f3
-
Upload README.md with huggingface_hub
Verified signature0b85f6f
-
Upload model-00012-of-00013.safetensors with huggingface_hub
Verified signature0f43a44 -
Upload model-00011-of-00013.safetensors with huggingface_hub
Verified signaturec1de2d5 -
Upload model-00010-of-00013.safetensors with huggingface_hub
Verified signature01c22af -
Upload model-00009-of-00013.safetensors with huggingface_hub
Verified signatureb103b12 -
Upload model-00008-of-00013.safetensors with huggingface_hub
Verified signaturefa444fb -
Upload model-00007-of-00013.safetensors with huggingface_hub
Verified signaturef2ce70d -
Upload model-00006-of-00013.safetensors with huggingface_hub
Verified signatureb9d9e1d -
Upload model-00005-of-00013.safetensors with huggingface_hub
Verified signature302d8d1 -
Upload model-00004-of-00013.safetensors with huggingface_hub
Verified signature2705265 -
Upload model-00003-of-00013.safetensors with huggingface_hub
Verified signature2a06179 -
Upload model-00002-of-00013.safetensors with huggingface_hub
Verified signaturedc0ddf0 -
Upload model-00001-of-00013.safetensors with huggingface_hub
Verified signature31b78c7 -
Upload model-00000-of-00013.safetensors with huggingface_hub
Verified signature4c5351e
-
Upload README.md with huggingface_hub
Verified signature9c11c5e -
Upload README.md with huggingface_hub
Verified signatured1c5e1c -
Upload model.safetensors.index.json with huggingface_hub
Verified signature95e24d6 -
Upload config.json with huggingface_hub
Verified signature8051927 -
Upload LICENSE with huggingface_hub
Verified signatureb057f95 -
Upload vocab.json with huggingface_hub
Verified signature95eaec2 -
Upload tokenizer_config.json with huggingface_hub
Verified signature16415ff -
Upload tokenizer.json with huggingface_hub
Verified signature91ed4f6 -
Upload model.safetensors.index.json with huggingface_hub
Verified signaturead94037 -
Upload merges.txt with huggingface_hub
Verified signature481a07c -
Upload generation_config.json with huggingface_hub
Verified signature9075042 -
Upload config.json with huggingface_hub
Verified signature2eb22c5 -
Upload folder using huggingface_hub
Verified signature89c5e3e -
Upload README.md with huggingface_hub
Verified signature6fceec2 -
Upload LICENSE with huggingface_hub
Verified signaturedbf4d70 -
initial commit
Verified signaturee38c515