Update README.md
Browse files
README.md
CHANGED
@@ -10,4 +10,71 @@ tags:
|
|
10 |
- LlamaWithQuestions
|
11 |
- LwQ
|
12 |
- CoT
|
13 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
- LlamaWithQuestions
|
11 |
- LwQ
|
12 |
- CoT
|
13 |
+
---
|
14 |
+
|
15 |
+
![10b.gif](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/qd7Gw46jaK48VGjLsk5Qg.gif)
|
16 |
+
|
17 |
+
# **LwQ-Reasoner-10B**
|
18 |
+
|
19 |
+
LwQ-Reasoner-10B (Llama with Questions), based on the Llama 3.1 collection of multilingual large language models (LLMs), is a set of pre-trained and instruction-tuned generative models optimized for multilingual dialogue use cases. These models outperform many available open-source alternatives. Model Architecture: Llama 3.1 is an auto-regressive language model utilizing an optimized transformer architecture. The tuned versions undergo supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to better align with human preferences for helpfulness and safety. LwQ-Reasoner-10B is trained on synthetic reasoning datasets for mathematical reasoning and context-based problem-solving, with a focus on following instructions or keywords embedded in the input.
|
20 |
+
|
21 |
+
# **Use with transformers**
|
22 |
+
|
23 |
+
Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function.
|
24 |
+
|
25 |
+
Make sure to update your transformers installation via `pip install --upgrade transformers`.
|
26 |
+
|
27 |
+
```python
|
28 |
+
import transformers
|
29 |
+
import torch
|
30 |
+
|
31 |
+
model_id = "prithivMLmods/LwQ-Reasoner-10B"
|
32 |
+
|
33 |
+
pipeline = transformers.pipeline(
|
34 |
+
"text-generation",
|
35 |
+
model=model_id,
|
36 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
37 |
+
device_map="auto",
|
38 |
+
)
|
39 |
+
|
40 |
+
messages = [
|
41 |
+
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
|
42 |
+
{"role": "user", "content": "Who are you?"},
|
43 |
+
]
|
44 |
+
|
45 |
+
outputs = pipeline(
|
46 |
+
messages,
|
47 |
+
max_new_tokens=256,
|
48 |
+
)
|
49 |
+
print(outputs[0]["generated_text"][-1])
|
50 |
+
```
|
51 |
+
|
52 |
+
# **Intended Use**
|
53 |
+
|
54 |
+
1. **Multilingual Dialogue Systems**: LwQ-Reasoner-10B is designed for creating conversational agents capable of engaging in dialogues across multiple languages, making it suitable for global customer support and multilingual chatbots.
|
55 |
+
|
56 |
+
2. **Instruction-Following Tasks**: The model excels at tasks requiring adherence to specific instructions or keywords embedded in the input, such as form completion, task automation, and guided workflows.
|
57 |
+
|
58 |
+
3. **Mathematical Reasoning**: With specialized training on synthetic reasoning datasets, LwQ-Reasoner-10B can perform complex mathematical reasoning and problem-solving, making it useful for educational platforms, tutoring systems, and research assistance.
|
59 |
+
|
60 |
+
4. **Context-Based Problem Solving**: The model is optimized to handle contextually rich problems, allowing it to generate context-aware responses for applications such as summarization, question answering, and decision support.
|
61 |
+
|
62 |
+
5. **Content Generation**: It can generate high-quality content, including articles, reports, summaries, and creative writing, across various domains and languages.
|
63 |
+
|
64 |
+
6. **Knowledge Retrieval**: LwQ-Reasoner-10B can retrieve and synthesize information from its trained data to answer factual questions, assist in research, and support knowledge-intensive tasks.
|
65 |
+
|
66 |
+
# **Limitations**
|
67 |
+
|
68 |
+
1. **Performance Variability Across Languages**: While the model supports multiple languages, its performance may vary depending on the language, with better results for languages more prevalent in its training data.
|
69 |
+
|
70 |
+
2. **Handling of Niche Topics**: The model may struggle to provide accurate information or generate high-quality content for highly specialized or niche topics not covered extensively in its training data.
|
71 |
+
|
72 |
+
3. **Complex Multi-Step Reasoning**: Although trained on reasoning datasets, the model may still occasionally produce incorrect or incomplete results for multi-step or highly complex reasoning tasks.
|
73 |
+
|
74 |
+
4. **Bias and Ethical Concerns**: Since LwQ-Reasoner-10B is trained on large, publicly available datasets, it may inherit biases present in the data, leading to potential ethical concerns or inappropriate outputs in certain contexts.
|
75 |
+
|
76 |
+
5. **Context Limitations**: The model has a finite context window, which may lead to incomplete understanding or response generation for tasks requiring extensive context or very long input texts.
|
77 |
+
|
78 |
+
6. **Resource Intensive**: As a large-scale model with 10 billion parameters, it requires substantial computational resources for both inference and deployment, limiting its use in resource-constrained environments.
|
79 |
+
|
80 |
+
7. **Instruction Ambiguity**: The model’s performance can degrade when instructions are ambiguous, vague, or conflicting, potentially leading to outputs that do not align with user expectations.
|