DhanOS commited on
Commit
b64fd41
1 Parent(s): 9d83cd3

Added README.md

Browse files
Files changed (1) hide show
  1. README.md +130 -0
README.md ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Deepthought-8B
2
+
3
+ Deepthought-8B is a small and capable reasoning model built on LLaMA-3.1 8B, designed to make AI reasoning more transparent and controllable. Despite its relatively small size, it achieves sophisticated reasoning capabilities that rival much larger models.
4
+
5
+ ## Model Description
6
+
7
+ Deepthought-8B is designed with a unique approach to problem-solving, breaking down its thinking into clear, distinct, documented steps. The model outputs its reasoning process in a structured JSON format, making it easier to understand and validate its decision-making process.
8
+
9
+ ### Key Features
10
+
11
+ - **Transparent Reasoning**: Step-by-step documentation of the thought process
12
+ - **Programmable Approach**: Customizable reasoning patterns without model retraining
13
+ - **Test-time Compute Scaling**: Flexible reasoning depth based on task complexity
14
+ - **Efficient Scale**: Runs on 16GB+ VRAM
15
+ - **Structured Output**: JSON-formatted reasoning chains for easy integration
16
+
17
+ Try out Deepthought-8B on our Ruliad interface: https://chat.ruliad.co
18
+
19
+ ## Technical Requirements
20
+
21
+ - Python 3.6+
22
+ - PyTorch
23
+ - Transformers library
24
+ - 16GB+ VRAM
25
+ - Optional: Flash Attention 2 for improved performance
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install torch transformers
31
+ # Optional: Install Flash Attention 2 for better performance
32
+ pip install flash-attn
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ 1. First, set your HuggingFace token as an environment variable:
38
+ ```bash
39
+ export HF_TOKEN=your_token_here
40
+ export HF_HUB_ENABLE_HF_TRANSFER=1
41
+ ```
42
+
43
+ 2. Use the model in your Python code:
44
+ ```python
45
+ from transformers import AutoModelForCausalLM, AutoTokenizer
46
+ import torch
47
+
48
+ # Initialize the model
49
+ model_name = "ruliad/Deepthought-8b-llama-v0.01-alpha"
50
+ tokenizer = AutoTokenizer.from_pretrained(
51
+ model_name,
52
+ add_bos_token=False,
53
+ trust_remote_code=True,
54
+ padding="left",
55
+ torch_dtype=torch.bfloat16,
56
+ )
57
+
58
+ model = AutoModelForCausalLM.from_pretrained(
59
+ model_name,
60
+ torch_dtype=torch.bfloat16,
61
+ device_map="auto",
62
+ attn_implementation="flash_attention_2", # Use "default" if flash_attn not installed
63
+ use_cache=True,
64
+ trust_remote_code=True,
65
+ )
66
+ ```
67
+
68
+ 3. Run the provided example script:
69
+ ```bash
70
+ python Deepthought_inference.py
71
+ ```
72
+
73
+ ## Example Output
74
+
75
+ The model provides structured reasoning in JSON format:
76
+
77
+ ```json
78
+ {
79
+ "step": 1,
80
+ "type": "problem_understanding",
81
+ "thought": "Understanding the user's objective for the task."
82
+ }
83
+ ```
84
+
85
+ Each reasoning chain includes multiple steps:
86
+ 1. Problem understanding
87
+ 2. Data gathering
88
+ 3. Analysis
89
+ 4. Calculation (when applicable)
90
+ 5. Verification
91
+ 6. Conclusion drawing
92
+ 7. Implementation
93
+
94
+ ## Performance
95
+
96
+ Deepthought-8B demonstrates strong performance across various benchmarks:
97
+ - Step-by-step problem-solving
98
+ - Coding and mathematical tasks
99
+ - Instruction following with transparent reasoning
100
+ - Scalable performance with test-time compute
101
+
102
+ ## Limitations
103
+
104
+ Current known limitations include:
105
+ - Complex mathematical reasoning
106
+ - Long-context processing
107
+ - Edge case handling
108
+
109
+ ## License
110
+
111
+ The model is available under a commercial license for enterprise use.
112
+
113
+ ## Citation
114
+
115
+ If you use this model in your research, please cite:
116
+
117
+ ```bibtex
118
+ @misc{Deepthought2024,
119
+ author = {Ruliad AI},
120
+ title = {Deepthought-8B: A Small and Capable Reasoning Model},
121
+ year = {2024},
122
+ publisher = {Ruliad}
123
+ }
124
+ ```
125
+
126
+ ## Support
127
+
128
+ For questions and feedback:
129
+ - Twitter: @ruliad_ai
130
+ - Email: [email protected]