nihitdesai
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,69 @@
|
|
1 |
-
---
|
2 |
-
license: cc-by-nc-4.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-4.0
|
3 |
+
base_model:
|
4 |
+
- Qwen/Qwen2-1.5B-Instruct
|
5 |
+
tags:
|
6 |
+
- data processing
|
7 |
+
- slm
|
8 |
+
---
|
9 |
+
|
10 |
+
|
11 |
+
## Model Details
|
12 |
+
|
13 |
+
RefuelLLM-2-mini, aka Qwen-2-Refueled, is a Qwen-2-1.5B base model instruction tuned on a corpus of 2750+ datasets, spanning tasks such as classification, reading comprehension, structured attribute extraction and entity resolution. We're excited to open-source the model for the community to build on top of.
|
14 |
+
|
15 |
+
More details about [RefuelLLM-2-mini](https://www.refuel.ai/blog-posts/refuel-llm-2-mini), and the [RefuelLLM-2 family of models](https://www.refuel.ai/blog-posts/announcing-refuel-llm-2).
|
16 |
+
|
17 |
+
**Model developers** - Refuel AI
|
18 |
+
|
19 |
+
**Input** - Text only.
|
20 |
+
|
21 |
+
**Output** - Text only.
|
22 |
+
|
23 |
+
**Architecture** - Qwen-2-Refueled is built on top of a Qwen-2-1.5B base model.
|
24 |
+
|
25 |
+
**Release Date** - May 8, 2024.
|
26 |
+
|
27 |
+
**License** - [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.en)
|
28 |
+
|
29 |
+
## How to use
|
30 |
+
|
31 |
+
This repository contains weights for Qwen-2-Refueled that are compatible for use with HuggingFace. See the snippet below for usage with Transformers:
|
32 |
+
|
33 |
+
```python
|
34 |
+
>>> import torch
|
35 |
+
>>> from transformers import AutoModelForCausalLM, AutoTokenizer
|
36 |
+
|
37 |
+
>>> model_id = "refuelai/Qwen-2-Refueled"
|
38 |
+
>>> tokenizer = AutoTokenizer.from_pretrained(model_id)
|
39 |
+
>>> model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
|
40 |
+
|
41 |
+
>>> messages = [{"role": "user", "content": "Is this comment toxic or non-toxic: RefuelLLM is the new way to label text data!"}]
|
42 |
+
|
43 |
+
>>> inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to("cuda")
|
44 |
+
|
45 |
+
>>> outputs = model.generate(inputs, max_new_tokens=20)
|
46 |
+
>>> print(tokenizer.decode(outputs[0]))
|
47 |
+
```
|
48 |
+
|
49 |
+
## Benchmarks
|
50 |
+
|
51 |
+
In this section, we report the output quality results on our benchmark of labeling tasks. For details on the methodology see [here](https://www.refuel.ai/blog-posts/refuel-llm-2-mini).
|
52 |
+
|
53 |
+
|
54 |
+
| Model | Size | Overall | Classification | Reading Comprehension | Structure Extraction | Entity Matching |
|
55 |
+
|---------------------|-------|-----------|----------------|-----------------------|-----------------------|-----------------|
|
56 |
+
| RefuelLLM-2-mini | 1.5B | **75.02%**| **72.18%** | **78.18%** | 75.18% | 80.75% |
|
57 |
+
| Qwen-2-3B | 3B | 67.62% | 70.91% | 71.53% | **75.72%** | 80.75% |
|
58 |
+
| Phi-3.5-mini-instruct | 3.8B | 65.63% | 70.57% | 71.89% | 65.34% | **83.53%** |
|
59 |
+
| Gemma-2-2B | 2B | 64.52% | 67.99% | 67.94% | 76.01% | 39.50% |
|
60 |
+
| Llama-3-3B | 3B | 55.80% | 55.81% | 65.12% | 61.50% | 55.01% |
|
61 |
+
| Qwen-2-1.5B | 1.5B | 51.22% | 47.36% | 67.15% | 56.17% | 45.25% |
|
62 |
+
| Llama-3-1B | 1B | 39.92% | 44.58% | 29.67% | 39.50% | 62.94% |
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
## Limitations
|
67 |
+
|
68 |
+
The Qwen-2-Refueled does not have any moderation mechanisms. We're looking forward to engaging with the community
|
69 |
+
on ways to make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
|