Instructions to use rombodawg/DeepMagic-Coder-7b-Alt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rombodawg/DeepMagic-Coder-7b-Alt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rombodawg/DeepMagic-Coder-7b-Alt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rombodawg/DeepMagic-Coder-7b-Alt") model = AutoModelForCausalLM.from_pretrained("rombodawg/DeepMagic-Coder-7b-Alt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rombodawg/DeepMagic-Coder-7b-Alt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rombodawg/DeepMagic-Coder-7b-Alt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rombodawg/DeepMagic-Coder-7b-Alt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rombodawg/DeepMagic-Coder-7b-Alt
- SGLang
How to use rombodawg/DeepMagic-Coder-7b-Alt 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 "rombodawg/DeepMagic-Coder-7b-Alt" \ --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": "rombodawg/DeepMagic-Coder-7b-Alt", "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 "rombodawg/DeepMagic-Coder-7b-Alt" \ --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": "rombodawg/DeepMagic-Coder-7b-Alt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rombodawg/DeepMagic-Coder-7b-Alt with Docker Model Runner:
docker model run hf.co/rombodawg/DeepMagic-Coder-7b-Alt
| license: other | |
| license_name: deepseek | |
| license_link: https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/LICENSE-MODEL | |
| (Note: From short testing, this Alt version generated much better code) | |
| Alternate version of DeepMagic-Coder-7b which can be found bellow. | |
| - https://huggingface.co/rombodawg/DeepMagic-Coder-7b | |
|  | |
| This version uses a diffrent config setup, with the actual base model of the two merges as the "base_model". Test both for yourself and see which is better at coding. Benchmarks coming soon. | |
| Config can be found bellow: | |
| ```yaml | |
| models: | |
| - model: deepseek-ai_deepseek-coder-6.7b-instruct | |
| parameters: | |
| weight: 1 | |
| - model: ise-uiuc_Magicoder-S-DS-6.7B | |
| parameters: | |
| weight: 1 | |
| merge_method: task_arithmetic | |
| base_model: deepseek-ai_deepseek-coder-6.7b-base | |
| parameters: | |
| normalize: true | |
| int8_mask: true | |
| dtype: float16 | |
| ``` | |