Update README.md
Browse files
README.md
CHANGED
|
@@ -9,4 +9,84 @@ pipeline_tag: text-generation
|
|
| 9 |
library_name: transformers
|
| 10 |
tags:
|
| 11 |
- text-generation-inference
|
| 12 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
library_name: transformers
|
| 10 |
tags:
|
| 11 |
- text-generation-inference
|
| 12 |
+
---
|
| 13 |
+
# **Deepthink-Llama-3-8B-Preview**
|
| 14 |
+
The **Deepthink-Llama-3-8B-Preview** is a fine-tuned version of the **Llama-3.1-8B** base model, further enhanced with the **Rethinking R1 Dataset Logits** for superior text generation. This model is designed for advanced reasoning, structured problem-solving, and contextually rich outputs, making it an excellent choice for applications in **education, programming, research, and creative writing**.
|
| 15 |
+
|
| 16 |
+
With its optimized architecture, **Deepthink-Llama-3-8B-Preview** excels at:
|
| 17 |
+
- **Logical reasoning** and **step-by-step problem solving**
|
| 18 |
+
- **Mathematical and coding tasks**, leveraging specialized expert models
|
| 19 |
+
- **Generating long-form content** (up to 8K tokens) with improved coherence
|
| 20 |
+
- **Understanding structured data**, including tables and JSON outputs
|
| 21 |
+
- **Instruction following** and **adapting to diverse system prompts**, making it ideal for chatbots and AI assistants
|
| 22 |
+
|
| 23 |
+
### **Key Features**
|
| 24 |
+
- **Supports long-context processing** of up to **128K tokens**
|
| 25 |
+
- **Multilingual capabilities** for 29+ languages, including English, Chinese, Spanish, French, German, Arabic, and more
|
| 26 |
+
- **Fine-tuned using Supervised Fine-Tuning (SFT) and Reinforcement Learning with Human Feedback (RLHF)**
|
| 27 |
+
|
| 28 |
+
### **Model Architecture**
|
| 29 |
+
Deepthink-Llama-3-8B-Preview is built on the optimized transformer architecture of **Llama-3.1-8B**, integrating **enhanced dataset logits from Rethinking R1** for better contextual understanding and output quality.
|
| 30 |
+
|
| 31 |
+
### **Use with transformers**
|
| 32 |
+
To run conversational inference using `transformers >= 4.43.0`, use the `pipeline` abstraction or leverage the `generate()` function with the Auto classes.
|
| 33 |
+
|
| 34 |
+
Ensure your environment is updated with:
|
| 35 |
+
```bash
|
| 36 |
+
pip install --upgrade transformers
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
#### **Example Usage**
|
| 40 |
+
```python
|
| 41 |
+
import torch
|
| 42 |
+
from transformers import pipeline
|
| 43 |
+
|
| 44 |
+
model_id = "prithivMLmods/Deepthink-Llama-3-8B-Preview"
|
| 45 |
+
pipe = pipeline(
|
| 46 |
+
"text-generation",
|
| 47 |
+
model=model_id,
|
| 48 |
+
torch_dtype=torch.bfloat16,
|
| 49 |
+
device_map="auto",
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
messages = [
|
| 53 |
+
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
|
| 54 |
+
{"role": "user", "content": "Who are you?"},
|
| 55 |
+
]
|
| 56 |
+
|
| 57 |
+
outputs = pipe(
|
| 58 |
+
messages,
|
| 59 |
+
max_new_tokens=256,
|
| 60 |
+
)
|
| 61 |
+
print(outputs[0]["generated_text"][-1])
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
### **Intended Use**
|
| 65 |
+
**Deepthink-Llama-3-8B-Preview** is designed for a wide range of applications requiring deep reasoning, structured outputs, and logical text generation. It is particularly suited for:
|
| 66 |
+
|
| 67 |
+
- **Education & Research**: Generating detailed explanations, step-by-step solutions, and structured academic content.
|
| 68 |
+
- **Programming & Code Generation**: Assisting in code writing, debugging, and algorithm explanations with improved logic structuring.
|
| 69 |
+
- **AI Chatbots & Assistants**: Providing context-aware, instruction-following responses for conversational AI applications.
|
| 70 |
+
- **Creative Writing**: Generating high-quality stories, articles, and structured narratives with coherence.
|
| 71 |
+
- **Data Analysis & Structured Output Generation**: Interpreting and generating JSON, tables, and formatted outputs for structured data processing.
|
| 72 |
+
|
| 73 |
+
### **Limitations**
|
| 74 |
+
While **Deepthink-Llama-3-8B-Preview** is optimized for deep reasoning and structured outputs, it has some limitations:
|
| 75 |
+
|
| 76 |
+
1. **Not a Real-time Knowledge Source**
|
| 77 |
+
- The model is trained on a fixed dataset and does not have real-time internet access. It may not provide up-to-date information on rapidly evolving topics.
|
| 78 |
+
|
| 79 |
+
2. **Potential Biases**
|
| 80 |
+
- As with all AI models, responses may reflect biases present in the training data. Users should critically evaluate outputs, especially in sensitive domains.
|
| 81 |
+
|
| 82 |
+
3. **Mathematical & Logical Reasoning Constraints**
|
| 83 |
+
- While strong in step-by-step reasoning, it may occasionally produce incorrect mathematical calculations or logical inconsistencies. External verification is recommended for critical applications.
|
| 84 |
+
|
| 85 |
+
4. **Handling of Extremely Long Contexts**
|
| 86 |
+
- While it supports up to 128K tokens, efficiency and coherence may degrade when processing very long documents or conversations.
|
| 87 |
+
|
| 88 |
+
5. **Limited Handling of Ambiguity**
|
| 89 |
+
- The model may struggle with highly ambiguous or context-dependent queries, sometimes generating plausible but incorrect responses.
|
| 90 |
+
|
| 91 |
+
6. **Ethical & Compliance Considerations**
|
| 92 |
+
- Not intended for generating misinformation, automating legal or medical decisions, or other high-risk applications without human oversight.
|