prithivMLmods commited on
Commit
4039116
1 Parent(s): ce4d31f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +190 -3
README.md CHANGED
@@ -1,3 +1,190 @@
1
- ---
2
- license: creativeml-openrail-m
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: creativeml-openrail-m
3
+ language:
4
+ - en
5
+ base_model:
6
+ - prithivMLmods/QwQ-LCoT-3B-Instruct
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - text-generation-inference
10
+ - long-CoT
11
+ - 3B
12
+ - Instruct
13
+ - QwQ
14
+ datasets:
15
+ - amphora/QwQ-LongCoT-130K
16
+ library_name: transformers
17
+ ---
18
+ ### **QwQ-LCoT-3B-Instruct-GGUF Model Card**
19
+
20
+ The **QwQ-LCoT-3B-Instruct** model is a lightweight, instruction-tuned language model designed for complex reasoning and explanation tasks. It is fine-tuned on the **Qwen2.5-3B-Instruct** base model using the **QwQ-LongCoT-130K** dataset, focusing on **long-chain-of-thought (LCoT)** reasoning for enhanced logical comprehension and detailed output generation.
21
+
22
+ | **File Name** | **Size** | **Description** | **Upload Status** |
23
+ |----------------------------------------|----------------|-------------------------------------------------|--------------------|
24
+ | `.gitattributes` | 1.79 kB | Specifies LFS tracking for large files. | Uploaded |
25
+ | `Modelfile` | 1.69 kB | Possibly metadata or additional configuration. | Uploaded |
26
+ | `QwQ-LCoT-3B-Instruct.F16.gguf` | 6.18 GB | Model weights in full precision (FP16). | Uploaded (LFS) |
27
+ | `QwQ-LCoT-3B-Instruct.Q4_K_M.gguf` | 1.93 GB | Quantized model weights (Q4_K_M). | Uploaded (LFS) |
28
+ | `QwQ-LCoT-3B-Instruct.Q5_K_M.gguf` | 2.22 GB | Quantized model weights (Q5_K_M). | Uploaded (LFS) |
29
+ | `QwQ-LCoT-3B-Instruct.Q8_0.gguf` | 3.29 GB | Quantized model weights (Q8_0). | Uploaded (LFS) |
30
+ | `README.md` | 42 Bytes | Initial commit for project documentation. | Uploaded |
31
+ | `config.json` | 29 Bytes | Minimal configuration file for the model. | Uploaded |
32
+
33
+ ### **Key Features:**
34
+
35
+ 1. **Long Chain-of-Thought Reasoning:**
36
+ - Specifically designed to generate comprehensive, step-by-step explanations for complex queries.
37
+
38
+ 2. **Lightweight and Efficient:**
39
+ - With only 3 billion parameters, it is optimized for systems with limited computational resources without compromising reasoning capabilities.
40
+
41
+ 3. **Instruction Optimization:**
42
+ - Fine-tuned to follow prompts and provide concise, actionable, and structured responses.
43
+
44
+ ---
45
+
46
+ ### **Training Details:**
47
+
48
+ - **Base Model:** [Qwen2.5-3B-Instruct](#)
49
+ - **Dataset:** [amphora/QwQ-LongCoT-130K](#)
50
+ - Comprising 133,000 annotated samples focusing on logical tasks and structured thinking.
51
+ ---
52
+
53
+ ### **Capabilities:**
54
+
55
+ 1. **Text Generation:**
56
+ - Provides detailed, structured, and logical text outputs tailored to user prompts.
57
+
58
+ 2. **Reasoning Tasks:**
59
+ - Solves step-by-step problems in math, logic, and science.
60
+
61
+ 3. **Educational Assistance:**
62
+ - Generates coherent explanations for academic and research purposes.
63
+
64
+ 4. **Dialogue and Summarization:**
65
+ - Handles conversational queries and summarizes long documents effectively.
66
+
67
+ ---
68
+
69
+ ### **Usage Instructions:**
70
+
71
+ 1. **Setup:**
72
+ Download all model files and ensure compatibility with the Hugging Face Transformers library.
73
+
74
+ 2. **Loading the Model:**
75
+ ```python
76
+ from transformers import AutoModelForCausalLM, AutoTokenizer
77
+
78
+ model_name = "prithivMLmods/QwQ-LCoT-3B-Instruct"
79
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
80
+ model = AutoModelForCausalLM.from_pretrained(model_name)
81
+ ```
82
+
83
+ 3. **Generate Long-Chain Reasoning Outputs:**
84
+ ```python
85
+ input_text = "Explain the process of photosynthesis step-by-step."
86
+ inputs = tokenizer(input_text, return_tensors="pt")
87
+ outputs = model.generate(**inputs, max_length=300, temperature=0.5)
88
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
89
+ ```
90
+
91
+ 4. **Customize Output Generation:**
92
+ Modify the `generation_config.json` file for different scenarios:
93
+ - **`temperature`**: Controls randomness (lower = deterministic, higher = creative).
94
+ - **`max_length`**: Sets response length.
95
+ - **`top_p`**: Adjusts sampling for diversity in outputs.
96
+
97
+ ---
98
+
99
+ # Run with Ollama [ Ollama Run ]
100
+
101
+ ## Overview
102
+
103
+ Ollama is a powerful tool that allows you to run machine learning models effortlessly. This guide will help you download, install, and run your own GGUF models in just a few minutes.
104
+
105
+ ## Table of Contents
106
+
107
+ - [Download and Install Ollama](#download-and-install-ollama)
108
+ - [Steps to Run GGUF Models](#steps-to-run-gguf-models)
109
+ - [1. Create the Model File](#1-create-the-model-file)
110
+ - [2. Add the Template Command](#2-add-the-template-command)
111
+ - [3. Create and Patch the Model](#3-create-and-patch-the-model)
112
+ - [Running the Model](#running-the-model)
113
+ - [Sample Usage](#sample-usage)
114
+
115
+ ## Download and Install Ollama🦙
116
+
117
+ To get started, download Ollama from [https://ollama.com/download](https://ollama.com/download) and install it on your Windows or Mac system.
118
+
119
+ ## Steps to Run GGUF Models
120
+
121
+ ### 1. Create the Model File
122
+ First, create a model file and name it appropriately. For example, you can name your model file `metallama`.
123
+
124
+ ### 2. Add the Template Command
125
+ In your model file, include a `FROM` line that specifies the base model file you want to use. For instance:
126
+
127
+ ```bash
128
+ FROM Llama-3.2-1B.F16.gguf
129
+ ```
130
+
131
+ Ensure that the model file is in the same directory as your script.
132
+
133
+ ### 3. Create and Patch the Model
134
+ Open your terminal and run the following command to create and patch your model:
135
+
136
+ ```bash
137
+ ollama create metallama -f ./metallama
138
+ ```
139
+
140
+ Once the process is successful, you will see a confirmation message.
141
+
142
+ To verify that the model was created successfully, you can list all models with:
143
+
144
+ ```bash
145
+ ollama list
146
+ ```
147
+
148
+ Make sure that `metallama` appears in the list of models.
149
+
150
+ ---
151
+
152
+ ## Running the Model
153
+
154
+ To run your newly created model, use the following command in your terminal:
155
+
156
+ ```bash
157
+ ollama run metallama
158
+ ```
159
+
160
+ ### Sample Usage / Test
161
+
162
+ In the command prompt, you can execute:
163
+
164
+ ```bash
165
+ D:\>ollama run metallama
166
+ ```
167
+
168
+ You can interact with the model like this:
169
+
170
+ ```plaintext
171
+ >>> write a mini passage about space x
172
+ Space X, the private aerospace company founded by Elon Musk, is revolutionizing the field of space exploration.
173
+ With its ambitious goals to make humanity a multi-planetary species and establish a sustainable human presence in
174
+ the cosmos, Space X has become a leading player in the industry. The company's spacecraft, like the Falcon 9, have
175
+ demonstrated remarkable capabilities, allowing for the transport of crews and cargo into space with unprecedented
176
+ efficiency. As technology continues to advance, the possibility of establishing permanent colonies on Mars becomes
177
+ increasingly feasible, thanks in part to the success of reusable rockets that can launch multiple times without
178
+ sustaining significant damage. The journey towards becoming a multi-planetary species is underway, and Space X
179
+ plays a pivotal role in pushing the boundaries of human exploration and settlement.
180
+ ```
181
+ ---
182
+
183
+ ## Conclusion
184
+
185
+ With these simple steps, you can easily download, install, and run your own models using Ollama. Whether you're exploring the capabilities of Llama or building your own custom models, Ollama makes it accessible and efficient.
186
+
187
+
188
+ - This README provides clear instructions and structured information to help users navigate the process of using Ollama effectively. Adjust any sections as needed based on your specific requirements or additional details you may want to include.
189
+
190
+ ---