Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the deepseek model to the library #1040

Closed
Nan-Do opened this issue Nov 8, 2023 · 9 comments
Closed

Add the deepseek model to the library #1040

Nan-Do opened this issue Nov 8, 2023 · 9 comments
Labels
model request Model requests

Comments

@Nan-Do
Copy link

Nan-Do commented Nov 8, 2023

The deepseek model is currently the best coding open source model on the HumanEval dataset second only to ChatGPT4 by a little margin.
https://www.deepseek.com/
https://huggingface.co/deepseek-ai
https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct
https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct
https://evalplus.github.io/leaderboard.html

There are 7b and 33b model variants, the quantized versions can be found here:
https://huggingface.co/TheBloke/deepseek-coder-6.7B-instruct-GGUF
https://huggingface.co/TheBloke/deepseek-coder-33B-instruct-GGUF

This is a possible valid modelfile including a valid prompt template:

FROM ./deepseek-coder-33b-instruct.Q4_K_M.gguf

# set the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 0.2

# set the system prompt
TEMPLATE """{{ .System }}

### Instruction:
{{ .Prompt }}

### Response:
"""

SYSTEM """You are an advanced AI programming assistant."""

The authors propose a longer version of this template, which is more restrictive, as well as other variants for other kinds of inference
https://github.com/deepseek-ai/deepseek-coder#3-chat-model-inference

@eramax
Copy link

eramax commented Nov 8, 2023

Yes please add it.

@jmorganca jmorganca added the model request Model requests label Nov 8, 2023
@valentimarco
Copy link

+1

@daniel-a-diaz
Copy link

I was just about to write this feature request. Please add.

@kapral18
Copy link

+1

@gururise
Copy link

Any movement on this? Would love to use deepseek coder as a coding assistant and Ollama as the server. Would work great with the 'continue' vscode extension!

@Nan-Do
Copy link
Author

Nan-Do commented Nov 20, 2023

Just a reminder for anyone interested in using this model, you can still download the model and use the ollama create command to add it to your local repository of models.
https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md.

This is a short recipe to run the 7B model:

wget https://huggingface.co/TheBloke/deepseek-coder-6.7B-instruct-GGUF/resolve/main/deepseek-coder-6.7b-instruct.Q4_K_M.gguf

Create the modelfile, with the following contents, in the same directory you downloaded the model.

FROM ./deepseek-coder-6.7b-instruct.Q4_K_M.gguf

# set the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 0.1

# set the system prompt
TEMPLATE """{{ .System }}

### Instruction:
{{ .Prompt }}

### Response:
"""

SYSTEM """You are an advanced AI programming assistant."""

Run the ollama create command.

ollama create deepseek-7B -f ./modelfile

Use the model.

ollama run deepseek-7B

@mxyng
Copy link
Contributor

mxyng commented Nov 21, 2023

DeepSeek Coder is now available in the Ollama library

@Nan-Do
Copy link
Author

Nan-Do commented Nov 21, 2023

Just a comment for people interested in using this model, with the current configuration you'll need a graphic card with at least 16GB of VRAM (for the 6.7GB) in order to be able to use this model with GPU acceleration

@ex3ndr
Copy link
Contributor

ex3ndr commented Nov 22, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model request Model requests
Projects
None yet
Development

No branches or pull requests

9 participants