Text Generation
Transformers
PyTorch
Safetensors
English
Chinese
llama
code
conversational
text-generation-inference
Instructions to use codefuse-ai/CodeFuse-DeepSeek-33B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/CodeFuse-DeepSeek-33B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codefuse-ai/CodeFuse-DeepSeek-33B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/CodeFuse-DeepSeek-33B") model = AutoModelForCausalLM.from_pretrained("codefuse-ai/CodeFuse-DeepSeek-33B", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use codefuse-ai/CodeFuse-DeepSeek-33B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codefuse-ai/CodeFuse-DeepSeek-33B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codefuse-ai/CodeFuse-DeepSeek-33B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/codefuse-ai/CodeFuse-DeepSeek-33B
- SGLang
How to use codefuse-ai/CodeFuse-DeepSeek-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 "codefuse-ai/CodeFuse-DeepSeek-33B" \ --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": "codefuse-ai/CodeFuse-DeepSeek-33B", "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 "codefuse-ai/CodeFuse-DeepSeek-33B" \ --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": "codefuse-ai/CodeFuse-DeepSeek-33B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use codefuse-ai/CodeFuse-DeepSeek-33B with Docker Model Runner:
docker model run hf.co/codefuse-ai/CodeFuse-DeepSeek-33B
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,8 +53,8 @@ CodeFuse-DeepSeek-33B is a 33B Code-LLM finetuned by QLoRA on multiple code-rela
|
|
| 53 |
|
| 54 |
| Model | HumanEval(pass@1) | Date |
|
| 55 |
|:----------------------------|:-----------------:|:-------:|
|
| 56 |
-
| **CodeFuse-CodeLlama-34B** |
|
| 57 |
-
|**CodeFuse-CodeLlama-34B-4bits** |
|
| 58 |
| WizardCoder-Python-34B-V1.0 | 73.2% | 2023.8 |
|
| 59 |
| GPT-4(zero-shot) | 67.0% | 2023.3 |
|
| 60 |
| PanGu-Coder2 15B | 61.6% | 2023.8 |
|
|
@@ -64,9 +64,9 @@ CodeFuse-DeepSeek-33B is a 33B Code-LLM finetuned by QLoRA on multiple code-rela
|
|
| 64 |
| OctoCoder | 46.2% | 2023.8 |
|
| 65 |
| StarCoder-15B | 33.6% | 2023.5 |
|
| 66 |
| Qwen-14b | 32.3% | 2023.10 |
|
| 67 |
-
| **CodeFuse-StarCoder-15B** |
|
| 68 |
-
| **CodeFuse-QWen-14B** |
|
| 69 |
-
| **CodeFuse-CodeGeeX2-6B** |
|
| 70 |
| **CodeFuse-DeepSeek-33B** | **78.65%** | 2024.01 |
|
| 71 |
|
| 72 |
|
|
@@ -220,8 +220,8 @@ CodeFuse-DeepSeek-33B 是一个通过QLoRA对基座模型DeepSeek-Coder-33B进
|
|
| 220 |
|
| 221 |
| 模型 | HumanEval(pass@1) | 日期 |
|
| 222 |
|:----------------------------|:-----------------:|:-------:|
|
| 223 |
-
| **CodeFuse-CodeLlama-34B** |
|
| 224 |
-
|**CodeFuse-CodeLlama-34B-4bits** |
|
| 225 |
| WizardCoder-Python-34B-V1.0 | 73.2% | 2023.8 |
|
| 226 |
| GPT-4(zero-shot) | 67.0% | 2023.3 |
|
| 227 |
| PanGu-Coder2 15B | 61.6% | 2023.8 |
|
|
@@ -231,9 +231,9 @@ CodeFuse-DeepSeek-33B 是一个通过QLoRA对基座模型DeepSeek-Coder-33B进
|
|
| 231 |
| OctoCoder | 46.2% | 2023.8 |
|
| 232 |
| StarCoder-15B | 33.6% | 2023.5 |
|
| 233 |
| Qwen-14b | 32.3% | 2023.10 |
|
| 234 |
-
| **CodeFuse-StarCoder-15B** |
|
| 235 |
-
| **CodeFuse-QWen-14B** |
|
| 236 |
-
| **CodeFuse-CodeGeeX2-6B** |
|
| 237 |
| **CodeFuse-DeepSeek-33B**. | **78.65%** | 2024.01 |
|
| 238 |
|
| 239 |
|
|
|
|
| 53 |
|
| 54 |
| Model | HumanEval(pass@1) | Date |
|
| 55 |
|:----------------------------|:-----------------:|:-------:|
|
| 56 |
+
| **CodeFuse-CodeLlama-34B** | 74.4% | 2023.9 |
|
| 57 |
+
|**CodeFuse-CodeLlama-34B-4bits** | 73.8% | 2023.9 |
|
| 58 |
| WizardCoder-Python-34B-V1.0 | 73.2% | 2023.8 |
|
| 59 |
| GPT-4(zero-shot) | 67.0% | 2023.3 |
|
| 60 |
| PanGu-Coder2 15B | 61.6% | 2023.8 |
|
|
|
|
| 64 |
| OctoCoder | 46.2% | 2023.8 |
|
| 65 |
| StarCoder-15B | 33.6% | 2023.5 |
|
| 66 |
| Qwen-14b | 32.3% | 2023.10 |
|
| 67 |
+
| **CodeFuse-StarCoder-15B** | 54.9% | 2023.9 |
|
| 68 |
+
| **CodeFuse-QWen-14B** | 48.78% | 2023.10 |
|
| 69 |
+
| **CodeFuse-CodeGeeX2-6B** | 45.12% | 2023.11 |
|
| 70 |
| **CodeFuse-DeepSeek-33B** | **78.65%** | 2024.01 |
|
| 71 |
|
| 72 |
|
|
|
|
| 220 |
|
| 221 |
| 模型 | HumanEval(pass@1) | 日期 |
|
| 222 |
|:----------------------------|:-----------------:|:-------:|
|
| 223 |
+
| **CodeFuse-CodeLlama-34B** | 74.4% | 2023.9 |
|
| 224 |
+
|**CodeFuse-CodeLlama-34B-4bits** | 73.8% | 2023.9 |
|
| 225 |
| WizardCoder-Python-34B-V1.0 | 73.2% | 2023.8 |
|
| 226 |
| GPT-4(zero-shot) | 67.0% | 2023.3 |
|
| 227 |
| PanGu-Coder2 15B | 61.6% | 2023.8 |
|
|
|
|
| 231 |
| OctoCoder | 46.2% | 2023.8 |
|
| 232 |
| StarCoder-15B | 33.6% | 2023.5 |
|
| 233 |
| Qwen-14b | 32.3% | 2023.10 |
|
| 234 |
+
| **CodeFuse-StarCoder-15B** | 54.9% | 2023.9 |
|
| 235 |
+
| **CodeFuse-QWen-14B** | 48.78% | 2023.8 |
|
| 236 |
+
| **CodeFuse-CodeGeeX2-6B** | 45.12% | 2023.11 |
|
| 237 |
| **CodeFuse-DeepSeek-33B**. | **78.65%** | 2024.01 |
|
| 238 |
|
| 239 |
|