|
--- |
|
base_model: unsloth/DeepSeek-R1-Distill-Qwen-14B |
|
tags: |
|
- text-generation-inference |
|
- transformers |
|
- unsloth |
|
- qwen2 |
|
- trl |
|
license: apache-2.0 |
|
language: |
|
- en |
|
--- |
|
|
|
# Disclaimer!! |
|
Hello! This model is not perfect yet, I am just experimenting! |
|
This is me attempting the [AIMO Prize 2 Kaggle contest](https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-2) |
|
|
|
I have decided to release the models before the competition ends because I don't care about winning the contest as much! |
|
|
|
My research fields are Medical Computing and Reinforcement Learning. Feel free to add me on [LinkedIn](https://www.linkedin.com/in/sindhusatish/) if you want to chat! |
|
|
|
|
|
|
|
- **Developed by:** sindhusatish97 |
|
- **License:** apache-2.0 |
|
- **Finetuned from model :** unsloth/DeepSeek-R1-Distill-Qwen-14B |
|
|
|
This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library. - Huge thanks to the awesome team for releasing these distilled models! |
|
|
|
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth) |
|
|
|
|
|
# Test it out! |
|
```python |
|
|
|
!pip install unsloth |
|
# Also get the latest nightly Unsloth! |
|
!pip install --force-reinstall --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth.git |
|
from unsloth import FastLanguageModel |
|
import torch |
|
max_seq_length = 5120 # I chose this value based on Qwen's max sequence length. |
|
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+ |
|
load_in_4bit = True |
|
|
|
model, tokenizer = FastLanguageModel.from_pretrained( |
|
model_name = "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-AIMO_CoT", |
|
max_seq_length = max_seq_length, |
|
dtype = dtype, |
|
load_in_4bit = load_in_4bit, |
|
# token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf |
|
) |
|
FastLanguageModel.for_inference(model) |
|
inputs = tokenizer( |
|
[ |
|
"""4 pints of a 5% antifreeze solution and 8 pints of a 20% antifreeze solution must be mixed to obtain 12 pints of a |
|
solution with what percentage of antifreeze?""" |
|
], return_tensors = "pt").to("cuda") |
|
|
|
from transformers import TextStreamer |
|
text_streamer = TextStreamer(tokenizer) |
|
_ = model.generate(**inputs, streamer = text_streamer, max_length = 2048) |
|
``` |