aashish1904 commited on
Commit
94d2b9e
·
verified ·
1 Parent(s): d55faf7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +138 -0
README.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: creativeml-openrail-m
5
+ datasets:
6
+ - microsoft/orca-math-word-problems-200k
7
+ language:
8
+ - en
9
+ base_model:
10
+ - allenai/Llama-3.1-Tulu-3-8B
11
+ pipeline_tag: text-generation
12
+ library_name: transformers
13
+ tags:
14
+ - safetensors
15
+ - math
16
+ - tulu
17
+ - trl
18
+ - llama
19
+ - text-generation-inference
20
+ - math_lingo
21
+
22
+ ---
23
+
24
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
25
+
26
+
27
+ # QuantFactory/Tulu-MathLingo-8B-GGUF
28
+ This is quantized version of [prithivMLmods/Tulu-MathLingo-8B](https://huggingface.co/prithivMLmods/Tulu-MathLingo-8B) created using llama.cpp
29
+
30
+ # Original Model Card
31
+
32
+
33
+ # Tulu-MathLingo-8B Model Files
34
+
35
+ The **Tulu-MathLingo-8B** model is a fine-tuned version of **meta-llama/Llama-3.1-8B**, optimized for solving mathematical word problems and reasoning tasks in English and the Tulu language. The model integrates advanced language understanding and reasoning capabilities with a focus on providing solutions to math-related queries.
36
+
37
+ | **File Name** | **Size** | **Description** | **Upload Status** |
38
+ |-----------------------------------|--------------|------------------------------------------------|-------------------|
39
+ | `.gitattributes` | 1.57 kB | Configures LFS tracking for large files. | Updated |
40
+ | `README.md` | 292 Bytes | Basic details about the uploaded model. | Updated |
41
+ | `config.json` | 988 Bytes | Contains model architecture and metadata. | Uploaded |
42
+ | `generation_config.json` | 241 Bytes | Parameters for text generation (e.g., length, temperature). | Uploaded |
43
+ | `model-00001-of-00004.safetensors`| 4.98 GB | Part 1 of model weights. | Uploaded (LFS) |
44
+ | `model-00002-of-00004.safetensors`| 5 GB | Part 2 of model weights. | Uploaded (LFS) |
45
+ | `model-00003-of-00004.safetensors`| 4.92 GB | Part 3 of model weights. | Uploaded (LFS) |
46
+ | `model-00004-of-00004.safetensors`| 1.17 GB | Part 4 of model weights. | Uploaded (LFS) |
47
+ | `model.safetensors.index.json` | 25.4 kB | Index file for multi-part model weights. | Uploaded |
48
+ | `special_tokens_map.json` | 462 Bytes | Maps special tokens (e.g., `<PAD>`, `<EOS>`). | Uploaded |
49
+ | `tokenizer.json` | 17.2 MB | Full tokenizer configuration. | Uploaded (LFS) |
50
+ | `tokenizer_config.json` | 57.6 kB | Metadata for tokenizer usage. | Uploaded |
51
+ ### Sample Solve
52
+
53
+ ![xvxv.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/vX8m-ltsacAztTF9SqDxB.png)
54
+
55
+ ### **Key Features**
56
+
57
+ 1. **Multilingual Math Reasoning:**
58
+ - Designed for solving complex math problems in **English** and **Tulu**.
59
+
60
+ 2. **Text Generation:**
61
+ - Generates detailed and contextually accurate text responses.
62
+
63
+ 3. **Fine-Tuned Specializations:**
64
+ - Trained on the **microsoft/orca-math-word-problems-200k** dataset for word problem-solving.
65
+
66
+ 4. **Special Token Mapping:**
67
+ - Configured to use tokens for specific functions such as `<PAD>` and `<EOS>` effectively.
68
+
69
+ 5. **Secure and Efficient Storage:**
70
+ - Model weights are stored in the **Safetensors** format for secure and faster inference.
71
+
72
+ 6. **Large Parameter Size:**
73
+ - 8.03 billion parameters enable handling complex queries and multi-turn conversations.
74
+
75
+ ---
76
+
77
+ ### **Training Details**
78
+
79
+ - **Base Model:** [meta-llama/Llama-3.1-8B](#)
80
+ - **Fine-Tuned:**
81
+ - Through multiple stages: **SFT (Supervised Fine-Tuning)** and **DPO (Direct Preference Optimization)**.
82
+
83
+ - **Dataset:**
84
+ - Trained on **200k word problems** from the **Microsoft Orca Math Word Problems Dataset**.
85
+
86
+ - **Model Size:**
87
+ - 8.03B parameters, optimized for **FP16** tensor type.
88
+
89
+ ---
90
+
91
+ ### **Applications**
92
+
93
+ 1. **Mathematical Word Problems:**
94
+ - Solve structured or unstructured math problems in natural language.
95
+
96
+ 2. **Conversational AI for Math:**
97
+ - Engage users in interactive dialogues focused on math and logic reasoning.
98
+
99
+ 3. **Multilingual Support:**
100
+ - Supports queries in **Tulu** and **English**, enhancing accessibility.
101
+
102
+ 4. **Education Tools:**
103
+ - Useful in tutoring systems for math, helping students with problem-solving.
104
+
105
+ ---
106
+
107
+ ### **Usage**
108
+
109
+ #### **Loading the Model**
110
+ ```python
111
+ from transformers import AutoModelForCausalLM, AutoTokenizer
112
+
113
+ model_name = "prithivMLmods/Tulu-MathLingo-8B"
114
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
115
+ model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="fp16")
116
+ ```
117
+
118
+ ---
119
+
120
+ ##### **Math Word Problem**
121
+ ```python
122
+ query = "If a train travels 60 miles in 2 hours, what is its average speed?"
123
+ inputs = tokenizer(query, return_tensors="pt")
124
+ outputs = model.generate(**inputs, max_length=100)
125
+
126
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
127
+ print("Answer:", response)
128
+ ```
129
+ ### **Performance Requirements**
130
+
131
+ - **Hardware:**
132
+ - Requires a GPU with at least **24GB VRAM** for optimal performance due to model size and FP16 usage.
133
+
134
+ - **Optimization:**
135
+ - Use mixed precision (`fp16`) for reduced memory footprint.
136
+ - Split inference across multiple GPUs if necessary.
137
+
138
+ ---