prithivMLmods commited on
Commit
d90747a
·
verified ·
1 Parent(s): 21967bc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +90 -8
README.md CHANGED
@@ -7,12 +7,94 @@ base_model:
7
  pipeline_tag: text-generation
8
  library_name: transformers
9
  ---
10
-
11
  <pre align="center">
12
- .___ __ .__ .__ __ ____________. ________ ________ ____ ______________
13
- __| _/____ ____ _______/ |_| |__ |__| ____ | | __ \______ \_ |__ / _____/ / _____/| | \_ _____/
14
- / __ |/ __ \_/ __ \\____ \ __\ | \| |/ \| |/ / / /| __ \ / \ ___/ \ ___| | /| __)
15
- / /_/ \ ___/\ ___/| |_> > | | Y \ | | \ < / / | \_\ \ \ \_\ \ \_\ \ | / | \
16
- \____ |\___ >\___ > __/|__| |___| /__|___| /__|_ \ /____/ |___ / \______ /\______ /______/ \___ /
17
- \/ \/ \/|__| \/ \/ \/ \/ \/ \/ \/
18
- </pre>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  pipeline_tag: text-generation
8
  library_name: transformers
9
  ---
 
10
  <pre align="center">
11
+ .___ __ .__ .__ __ ____________.
12
+ __| _/____ ____ _______/ |_| |__ |__| ____ | | __ \______ \_ |__
13
+ / __ |/ __ \_/ __ \\____ \ __\ | \| |/ \| |/ / / /| __ \
14
+ / /_/ \ ___/\ ___/| |_> > | | Y \ | | \ < / / | \_\ \
15
+ \____ |\___ >\___ > __/|__| |___| /__|___| /__|_ \ /____/ |___ /
16
+ \/ \/ \/|__| \/ \/ \/ \/
17
+ </pre>
18
+
19
+ The **Deepthink-Reasoning-7B-GGUF** is a fine-tuned gguf version of the **Deepthink-Reasoning-7B** base model, designed for text generation tasks that require deep reasoning, logical structuring, and problem-solving. This model leverages its optimized architecture to provide accurate and contextually relevant outputs for complex queries, making it ideal for applications in education, programming, and creative writing.
20
+
21
+ With its robust natural language processing capabilities, **Deepthink-Reasoning-7B-GGUF** excels in generating step-by-step solutions, creative content, and logical analyses. Its architecture integrates advanced understanding of both structured and unstructured data, ensuring precise text generation aligned with user inputs.
22
+
23
+ - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
24
+ - Significant improvements in **instruction following**, **generating long texts** (over 8K tokens), **understanding structured data** (e.g, tables), and **generating structured outputs** especially JSON. **More resilient to the diversity of system prompts**, enhancing role-play implementation and condition-setting for chatbots.
25
+ - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
26
+ - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
27
+
28
+ # **Run with Ollama [Ollama Run]**
29
+
30
+ Ollama makes running machine learning models simple and efficient. Follow these steps to set up and run your GGUF models quickly.
31
+
32
+ ## Quick Start: Step-by-Step Guide
33
+
34
+ | Step | Description | Command / Instructions |
35
+ |------|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
36
+ | 1 | **Install Ollama 🦙** | Download Ollama from [https://ollama.com/download](https://ollama.com/download) and install it on your system. |
37
+ | 2 | **Create Your Model File** | - Create a file named after your model, e.g., `metallama`. |
38
+ | | | - Add the following line to specify the base model: |
39
+ | | | ```bash |
40
+ | | | FROM Llama-3.2-1B.F16.gguf |
41
+ | | | ``` |
42
+ | | | - Ensure the base model file is in the same directory. |
43
+ | 3 | **Create and Patch the Model** | Run the following commands to create and verify your model: |
44
+ | | | ```bash |
45
+ | | | ollama create metallama -f ./metallama |
46
+ | | | ollama list |
47
+ | | | ``` |
48
+ | 4 | **Run the Model** | Use the following command to start your model: |
49
+ | | | ```bash |
50
+ | | | ollama run metallama |
51
+ | | | ``` |
52
+ | 5 | **Interact with the Model** | Once the model is running, interact with it: |
53
+ | | | ```plaintext |
54
+ | | | >>> Tell me about Space X. |
55
+ | | | Space X, the private aerospace company founded by Elon Musk, is revolutionizing space exploration... |
56
+ | | | ``` |
57
+
58
+ ## Conclusion
59
+
60
+ With Ollama, running and interacting with models is seamless. Start experimenting today!
61
+
62
+ # **Demo Start**
63
+
64
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
65
+
66
+ ```python
67
+ from transformers import AutoModelForCausalLM, AutoTokenizer
68
+
69
+ model_name = "prithivMLmods/Deepthink-Reasoning-7B"
70
+
71
+ model = AutoModelForCausalLM.from_pretrained(
72
+ model_name,
73
+ torch_dtype="auto",
74
+ device_map="auto"
75
+ )
76
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
77
+
78
+ prompt = "Give me a short introduction to large language model."
79
+ messages = [
80
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
81
+ {"role": "user", "content": prompt}
82
+ ]
83
+ text = tokenizer.apply_chat_template(
84
+ messages,
85
+ tokenize=False,
86
+ add_generation_prompt=True
87
+ )
88
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
89
+
90
+ generated_ids = model.generate(
91
+ **model_inputs,
92
+ max_new_tokens=512
93
+ )
94
+ generated_ids = [
95
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
96
+ ]
97
+
98
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
99
+ ```
100
+