Run this model with HF Jobs

Run deepseek-ai/DeepSeek-R1-Distill-Llama-8B 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 and TRL to fine-tune https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B. 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/deepseek-ai/DeepSeek-R1-Distill-Llama-8B 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/deepseek-ai/DeepSeek-R1-Distill-Llama-8B. 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.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

[Possible bug] Tokenizer removes thinking part

#31
by haritzpuerto - opened

Hi, I just noticed that when you tokenize and apply the chat template to a conversation with a thinking part, the tokenizer removes the thinking part and keeps only the final answer. I think this is not the expected behavior (why removing the thinking part?)

Minimal reproducible example
https://colab.research.google.com/drive/1VAU_XIxaAdooXQ_DpoOL0cx-MGNV1ZgN?usp=sharing

image.png

I believe the problem comes from this line in the chat template.

image.png

Is this a bug? If not, how to keep the reasoning traces (i.e., the thinking part)? Thanks!

@mgubri thinks this behavior might be for efficiency in multi-turn conversations. However, in my case, I am not creating a multi-turn conversation. I want to create a fine-tuning scenario following the original chat template, so I need to keep the reasoning traces. Hence, I think it would be useful to have a parameter to keep the reasoning traces.

Sign up or log in to comment