Instructions to use m-a-p/OpenCodeInterpreter-DS-33B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use m-a-p/OpenCodeInterpreter-DS-33B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="m-a-p/OpenCodeInterpreter-DS-33B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("m-a-p/OpenCodeInterpreter-DS-33B") model = AutoModelForCausalLM.from_pretrained("m-a-p/OpenCodeInterpreter-DS-33B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use m-a-p/OpenCodeInterpreter-DS-33B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "m-a-p/OpenCodeInterpreter-DS-33B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "m-a-p/OpenCodeInterpreter-DS-33B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/m-a-p/OpenCodeInterpreter-DS-33B
- SGLang
How to use m-a-p/OpenCodeInterpreter-DS-33B 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 "m-a-p/OpenCodeInterpreter-DS-33B" \ --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": "m-a-p/OpenCodeInterpreter-DS-33B", "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 "m-a-p/OpenCodeInterpreter-DS-33B" \ --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": "m-a-p/OpenCodeInterpreter-DS-33B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use m-a-p/OpenCodeInterpreter-DS-33B with Docker Model Runner:
docker model run hf.co/m-a-p/OpenCodeInterpreter-DS-33B
Can someone point to the chat template used for this model? Would be awesome.
When I use the .apply_chat_template, I get this warning: No chat template is defined for this tokenizer - using the default template for the LlamaTokenizerFast class. If the default is not appropriate for your model, please set tokenizer.chat_template to an appropriate template. See https://huggingface.co/docs/transformers/main/chat_templating for more information.
If you use tokenizer.apply_chat_template and there is no additional "chat_template" in the model tokenizer_config.json, a default template of torch package is used.
My problem is why the chat templated is provided inm-a-p/OpenCodeInterpreter-DS-6.7B but not provided in m-a-p/OpenCodeInterpreter-DS-33B.
And if i apply the chat template of 6.7B for 33B, 33B will return response in wierd format, which weaken its accuracy in HumanEval test.
Thanks I figured it out later, but was confused as it did not seem to have a system prompt at that time..
How did you solve that problem? Just make a Jinja template for it?
I just utilized a normal template of you are a smart assistant and helpful, etc. I applied it manually by giving this template to the tokenizer and then just applying it using tokenizer.apply_template