Improve language tag
#1
by
lbourdois
- opened
README.md
CHANGED
|
@@ -1,89 +1,103 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model:
|
| 3 |
-
- Qwen/Qwen2.5-3B-Instruct
|
| 4 |
-
pipeline_tag: text-generation
|
| 5 |
-
library_name: transformers
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
##
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
[contact Harshad Saykhedkar via LinkedIn](https://www.linkedin.com/in/harshadss/)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model:
|
| 3 |
+
- Qwen/Qwen2.5-3B-Instruct
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
library_name: transformers
|
| 6 |
+
language:
|
| 7 |
+
- zho
|
| 8 |
+
- eng
|
| 9 |
+
- fra
|
| 10 |
+
- spa
|
| 11 |
+
- por
|
| 12 |
+
- deu
|
| 13 |
+
- ita
|
| 14 |
+
- rus
|
| 15 |
+
- jpn
|
| 16 |
+
- kor
|
| 17 |
+
- vie
|
| 18 |
+
- tha
|
| 19 |
+
- ara
|
| 20 |
+
---
|
| 21 |
+
# AbleCredit Reasoner R0 Qwen 2.5 3B Instruct
|
| 22 |
+
|
| 23 |
+
## Introduction
|
| 24 |
+
|
| 25 |
+
This model is trained by Deepseek R1 style (GRPO) reinforcement learning on Qwen 2.5 3B Instruct as a base model.
|
| 26 |
+
Primarily intended for research in application of small LLMs trained using GRPO/RL in the domain of finance, credit underwriting etc.
|
| 27 |
+
|
| 28 |
+
### Model Description
|
| 29 |
+
|
| 30 |
+
- **Fine Tuned by:** AbleCredit (LightBees Technologies Private Limited, Bengaluru, India)
|
| 31 |
+
- **License:** We've retained the original Qwen research license. Note that license does not allow commercial use.
|
| 32 |
+
- **Finetuned from model:** Qwen/Qwen2.5-3B-Instruct
|
| 33 |
+
|
| 34 |
+
## How to Get Started with the Model
|
| 35 |
+
|
| 36 |
+
Use with standard Huggingface based setup
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
model_name = "AbleCredit/AbleCredit-R0-Qwen-2.5-3B-Instruct" # or local path to model
|
| 40 |
+
system_prompt = {
|
| 41 |
+
"role": "system",
|
| 42 |
+
"content": (
|
| 43 |
+
"You are a helpful assistant. User asks a question the assistant answers it.\n"
|
| 44 |
+
"The assistant first thinks about reasoning process in mind and then provides the user with the answer."
|
| 45 |
+
),
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
suffix_prompt = {
|
| 49 |
+
"role": "assistant",
|
| 50 |
+
"content": "Let me solve this step by step.\n<think>",
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
prompt_msgs = [
|
| 54 |
+
system_prompt,
|
| 55 |
+
{"role": "user", "content": "What is 15 times 3 ?"},
|
| 56 |
+
suffix_prompt,
|
| 57 |
+
]
|
| 58 |
+
|
| 59 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 60 |
+
model_name,
|
| 61 |
+
device_map="auto",
|
| 62 |
+
torch_dtype=torch.bfloat16,
|
| 63 |
+
)
|
| 64 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 65 |
+
|
| 66 |
+
prompt = tokenizer.apply_chat_template(
|
| 67 |
+
prompt_msgs,
|
| 68 |
+
tokenize=False,
|
| 69 |
+
continue_final_message=True,
|
| 70 |
+
add_generation_prompt=False,
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
+
# Tokenize the prompt and move it to the appropriate device.
|
| 74 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda:0")
|
| 75 |
+
|
| 76 |
+
print("\nGenerating response...\n")
|
| 77 |
+
outputs = model.generate(
|
| 78 |
+
**inputs,
|
| 79 |
+
max_new_tokens=1024,
|
| 80 |
+
temperature=0.5,
|
| 81 |
+
min_p=0.01,
|
| 82 |
+
)
|
| 83 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 84 |
+
print("\nResponse:\n", response)
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
## Training Details
|
| 88 |
+
|
| 89 |
+
### Training Data
|
| 90 |
+
|
| 91 |
+
Trained using open source logical reasoning datasets and a proprietary finance dataset created by AbleCredit.com.
|
| 92 |
+
|
| 93 |
+
### Training Procedure
|
| 94 |
+
|
| 95 |
+
Trained using deepseek style reinforcement learning using GRPO with rule based rewards.
|
| 96 |
+
|
| 97 |
+
## Evaluation
|
| 98 |
+
|
| 99 |
+
- Model achieves ~67% score on GSM8K benchmark in a **zero shot** setting (check benchmarking script for more details).
|
| 100 |
+
|
| 101 |
+
## Model Card Contact
|
| 102 |
+
|
| 103 |
[contact Harshad Saykhedkar via LinkedIn](https://www.linkedin.com/in/harshadss/)
|