sindhusatish97 commited on
Commit
4fdb82b
·
verified ·
1 Parent(s): ed2f3c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -1
README.md CHANGED
@@ -11,12 +11,52 @@ language:
11
  - en
12
  ---
13
 
 
 
 
 
 
 
 
 
14
  # Uploaded model
15
 
16
  - **Developed by:** sindhusatish97
17
  - **License:** apache-2.0
18
  - **Finetuned from model :** unsloth/DeepSeek-R1-Distill-Qwen-14B
19
 
20
- This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  - en
12
  ---
13
 
14
+ # Disclaimer!!
15
+ Hello! This model is not perfect yet, I am just experimenting!
16
+ This is me attempting the [AIMO Prize 2 Kaggle contest](https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-2)
17
+
18
+ I have decided to release the models before the competition ends because I don't care about winning the contest as much!
19
+
20
+ 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!
21
+
22
  # Uploaded model
23
 
24
  - **Developed by:** sindhusatish97
25
  - **License:** apache-2.0
26
  - **Finetuned from model :** unsloth/DeepSeek-R1-Distill-Qwen-14B
27
 
28
+ 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!
29
 
30
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
31
+
32
+
33
+ # Inference
34
+ ```python
35
+
36
+ !pip install unsloth
37
+ # Also get the latest nightly Unsloth!
38
+ !pip install --force-reinstall --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth.git
39
+ from unsloth import FastLanguageModel
40
+ import torch
41
+ max_seq_length = 5120 # I chose this value based on Qwen's max sequence length.
42
+ dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
43
+ load_in_4bit = True
44
+
45
+ model, tokenizer = FastLanguageModel.from_pretrained(
46
+ model_name = "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-AIMO_CoT",
47
+ max_seq_length = max_seq_length,
48
+ dtype = dtype,
49
+ load_in_4bit = load_in_4bit,
50
+ # token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf
51
+ )
52
+ FastLanguageModel.for_inference(model)
53
+ inputs = tokenizer(
54
+ [
55
+ """4 pints of a 5% antifreeze solution and 8 pints of a 20% antifreeze solution must be mixed to obtain 12 pints of a
56
+ solution with what percentage of antifreeze?"""
57
+ ], return_tensors = "pt").to("cuda")
58
+
59
+ from transformers import TextStreamer
60
+ text_streamer = TextStreamer(tokenizer)
61
+ _ = model.generate(**inputs, streamer = text_streamer, max_length = 2048)
62
+ ```