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

Create DeepSeek-R1-Tutorial.md #1215

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

parinitarahi
Copy link
Contributor

Tutorial for Deepseek run

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

examples/python/DeepSeek-R1Tutorial.md Outdated Show resolved Hide resolved
examples/python/DeepSeek-R1Tutorial.md Outdated Show resolved Hide resolved
examples/python/DeepSeek-R1Tutorial.md Outdated Show resolved Hide resolved
@parinitarahi parinitarahi requested a review from MaanavD February 1, 2025 01:11
MaanavD
MaanavD previously approved these changes Feb 1, 2025
Copy link

@MaanavD MaanavD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Not 100% sure if my approval will work

@parinitarahi parinitarahi removed the request for review from kunal-vaishnavi February 1, 2025 01:16
## 1. Pre-Requisites: Make a virtual environment and install ONNX Runtime GenAI
```bash
# Installing onnxruntime-genai, olive, and dependencies for CPU
python -m venv .venv && source .venv/bin/activate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we show instructions for a virtual environment using conda so that a Python version can be specified? The GenAI package is only available for Python 3.10, 3.11, and 3.12 currently.

```bash
#GPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly
curl -o https://raw.githubusercontent.com/microsoft/onnxruntime-genai/refs/heads/main/examples/python/model-chat.py
python model-chat.py -m deepseek-r1-distill-qwen-1.5B/model -e cpu --chat_template "<|begin▁of▁sentence|><|User|>{input}<|Assistant|>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python model-chat.py -m deepseek-r1-distill-qwen-1.5B/model -e cpu --chat_template "<|begin▁of▁sentence|><|User|>{input}<|Assistant|>"
python model-chat.py -m deepseek-r1-distill-qwen-1.5B/model -e cuda --chat_template "<|begin▁of▁sentence|><|User|>{input}<|Assistant|>"

```

```bash
#GPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#GPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly
# GPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly


## 3. Play with your model on device!
```bash
#CPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#CPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly
# CPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly

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

Successfully merging this pull request may close these issues.

3 participants