Run this model with HF Jobs
Run mlx-community/deepseek-coder-33b-instruct on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/mlx-community/deepseek-coder-33b-instruct. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/deepseek-coder-33b-instruct on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/mlx-community/deepseek-coder-33b-instruct. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use mlx-community/deepseek-coder-33b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/deepseek-coder-33b-instruct with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/deepseek-coder-33b-instruct") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use mlx-community/deepseek-coder-33b-instruct with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/deepseek-coder-33b-instruct"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/deepseek-coder-33b-instruct" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/deepseek-coder-33b-instruct", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Add files using upload-large-folder tool
Browse filesFiles changed (12)
- README.mdAdded+38
- chat_template.jinjaAdded+26
- config.jsonAdded+36
- generation_config.jsonAdded+6
- model-00001-of-00004.safetensorsAdded+3
- model-00002-of-00004.safetensorsAdded+3
- model-00003-of-00004.safetensorsAdded+3
- model-00004-of-00004.safetensorsAdded+3
- model.safetensors.index.jsonAdded
- special_tokens_map.jsonAdded+23
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+194
1234567891011121314151617181920212223242526272829303132333435363738---license: otherlicense_name: deepseeklicense_link: LICENSEbase_model: deepseek-ai/deepseek-coder-33b-instructpipeline_tag: text-generationtags:- mlxlibrary_name: mlx---
# mlx-community/deepseek-coder-33b-instruct
This model [mlx-community/deepseek-coder-33b-instruct](https://huggingface.co/mlx-community/deepseek-coder-33b-instruct) wasconverted to MLX format from [deepseek-ai/deepseek-coder-33b-instruct](https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct)using mlx-lm version **0.25.2**.
## Use with mlx
```bashpip install mlx-lm```
```pythonfrom mlx_lm import load, generate
model, tokenizer = load("mlx-community/deepseek-coder-33b-instruct")
prompt = "hello"
if tokenizer.chat_template is not None: messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True )
response = generate(model, tokenizer, prompt=prompt, verbose=True)```1234567891011121314151617181920212223242526{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{%- set ns = namespace(found=false) -%}{%- for message in messages -%} {%- if message['role'] == 'system' -%} {%- set ns.found = true -%} {%- endif -%}{%- endfor -%}{{bos_token}}{%- if not ns.found -%}{{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\n'}}{%- endif %}{%- for message in messages %} {%- if message['role'] == 'system' %}{{ message['content'] }} {%- else %} {%- if message['role'] == 'user' %}{{'### Instruction:\n' + message['content'] + '\n'}} {%- else %}{{'### Response:\n' + message['content'] + '\n<|EOT|>\n'}} {%- endif %} {%- endif %}{%- endfor %}{% if add_generation_prompt %}{{'### Response:'}}{% endif %}123456789101112131415161718192021222324252627282930313233343536{ "architectures": [ "LlamaForCausalLM" ], "bos_token_id": 32013, "eos_token_id": 32021, "hidden_act": "silu", "hidden_size": 7168, "initializer_range": 0.02, "intermediate_size": 19200, "max_position_embeddings": 16384, "model_type": "llama", "num_attention_heads": 56, "num_hidden_layers": 62, "num_key_value_heads": 8, "pretraining_tp": 1, "quantization": { "group_size": 64, "bits": 4 }, "quantization_config": { "group_size": 64, "bits": 4 }, "rms_norm_eps": 1e-06, "rope_scaling": { "factor": 4.0, "type": "linear" }, "rope_theta": 100000, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.33.1", "use_cache": true, "vocab_size": 32256}123456{ "_from_model_config": true, "bos_token_id": 32013, "eos_token_id": 32021, "transformers_version": "4.34.1"}123version https://git-lfs.github.com/spec/v1oid sha256:4d152687f69f7ca624ea39a53b4d5a123bd76240ced399cb3d4033af52109017size 5345224444123version https://git-lfs.github.com/spec/v1oid sha256:5546d983e1e555b55bd0f3c2cca08ff6cde7be344dc2fd00705d4394936ae8cesize 5365725643123version https://git-lfs.github.com/spec/v1oid sha256:9f572b19ffac739a448c8bfe100e2eadf65fae1b3f4e6e7169163eb636710ec5size 5365725607123version https://git-lfs.github.com/spec/v1oid sha256:15ce418e2dcf7beafa9ba513592615891cc0499b289e077fa85cd74cc455ee01size 26802094741234567891011121314151617181920212223{ "bos_token": { "content": "<|begin▁of▁sentence|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|EOT|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|end▁of▁sentence|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194{ "add_bos_token": true, "add_eos_token": false, "add_prefix_space": null, "added_tokens_decoder": { "32000": { "content": "õ", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32001": { "content": "÷", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32002": { "content": "Á", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32003": { "content": "ý", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32004": { "content": "À", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32005": { "content": "ÿ", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32006": { "content": "ø", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32007": { "content": "ú", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32008": { "content": "þ", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32009": { "content": "ü", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32010": { "content": "ù", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32011": { "content": "ö", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32012": { "content": "û", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32013": { "content": "<|begin▁of▁sentence|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true }, "32014": { "content": "<|end▁of▁sentence|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true }, "32015": { "content": "<|fim▁hole|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32016": { "content": "<|fim▁begin|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32017": { "content": "<|fim▁end|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32018": { "content": "<pad>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32019": { "content": "<|User|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32020": { "content": "<|Assistant|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "32021": { "content": "<|EOT|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "<|begin▁of▁sentence|>", "clean_up_tokenization_spaces": false, "eos_token": "<|EOT|>", "extra_special_tokens": {}, "legacy": true, "model_max_length": 16384, "pad_token": "<|end▁of▁sentence|>", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizerFast", "unk_token": null, "use_default_system_prompt": false}README.mdAdded+38
chat_template.jinjaAdded+26
config.jsonAdded+36
generation_config.jsonAdded+6
model-00001-of-00004.safetensorsAdded+3
model-00002-of-00004.safetensorsAdded+3
model-00003-of-00004.safetensorsAdded+3
model-00004-of-00004.safetensorsAdded+3
model.safetensors.index.jsonAdded
special_tokens_map.jsonAdded+23
tokenizer.jsonAdded
tokenizer_config.jsonAdded+194