aashish1904 commited on
Commit
1cdbf45
·
verified ·
1 Parent(s): 14920ae

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +161 -0
README.md ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ tags:
5
+ - Coder
6
+ - Math
7
+ - qwen2
8
+ - thinking
9
+ - reasoning
10
+ model-index:
11
+ - name: Palmyra-mini-thinking-a
12
+ results: []
13
+ license: apache-2.0
14
+ language:
15
+ - en
16
+
17
+ ---
18
+
19
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
20
+
21
+
22
+ # QuantFactory/palmyra-mini-thinking-a-GGUF
23
+ This is quantized version of [Writer/palmyra-mini-thinking-a](https://huggingface.co/Writer/palmyra-mini-thinking-a) created using llama.cpp
24
+
25
+ # Original Model Card
26
+
27
+
28
+ <div align="center">
29
+ <h1>Palmyra-mini-thinking-a</h1>
30
+
31
+ </div>
32
+
33
+ ### Model Description
34
+
35
+ - **Language(s) (NLP):** English
36
+ - **License:** Apache-2.0
37
+ - **Finetuned from model:** Qwen/Qwen2.5-1.5B
38
+ - **Context window:** 131,072 tokens
39
+ - **Parameters:** 1.7 billion
40
+
41
+
42
+ ## Model Details
43
+
44
+ The palmyra-mini-thinking-a model demonstrates exceptional performance in advanced mathematical reasoning and competitive programming. Its capabilities are highlighted by an outstanding score of 0.886 on the 'MATH500' benchmark, showcasing a robust ability to solve complex mathematical problems. The strength of the model in quantitative challenges is further confirmed by its score of 0.8287 on 'gsm8k (strict-match)', which demonstrates proficiency in multi-step arithmetic reasoning. Additionally, the model proves its aptitude for high-level problem-solving with a score of 0.8 on 'AMC23'. The model also shows strong potential in the coding domain, achieving a score of 0.5631 on 'Codeforces (pass_rate)' and 0.5481 on 'Olympiadbench (extractive_match)', indicating competence in generating correct solutions for programming challenges.
45
+
46
+ ## Benchmark Performance
47
+
48
+ This section provides a detailed breakdown of the palmyra-mini-thinking-a model's performance across a standardized set of industry benchmarks. The data is presented in its original order from the source evaluation.
49
+
50
+ | Benchmark | Score |
51
+ |:-----------------------------------------------------------------|---------:|
52
+ | gsm8k (strict-match) | 0.8287 |
53
+ | minerva_math(exact_match) | 0.3842 |
54
+ | mmlu_pro(exact_match) | 0.2748 |
55
+ | hendrycks_math | 0.0054 |
56
+ | ifeval (inst_level_loose_acc) | 0.3657 |
57
+ | mathqa (acc) | 0.4171 |
58
+ | humaneval (pass@1) | 0.2378 |
59
+ | BBH (get-answer)(exact_match) | 0.462 |
60
+ | mbpp | 0.304 |
61
+ | leadboard_musr (acc_norm) | 0.3413 |
62
+ | gpqa lighteval gpqa diamond_pass@1:8_samples | 0.3826 |
63
+ | AIME24(pass@1)(avg-of-1) | 0.4333 |
64
+ | AIME25(pass@1)(avg-of-1) | 0.3667 |
65
+ | Livecodebench-codegen (livecodebench/code_generation_lite v4_v5) | 0.1784 |
66
+ | AMC23 | 0.8 |
67
+ | MATH500 | 0.886 |
68
+ | Minerva | 0.3493 |
69
+ | Olympiadbench (extractive_match) | 0.5481 |
70
+ | Codecontests (pass_rate) | 0.1778 |
71
+ | Codeforces (pass_rate) | 0.5631 |
72
+ | Taco (pass_rate) | 0.3083 |
73
+ | APPS (all_levels) | 0.0447 |
74
+ | HMMT23 (extractive_match) | 0.1 |
75
+ | Average | 0.380839 |
76
+
77
+
78
+
79
+ ### Use with transformers
80
+
81
+ You can run conversational inference using the Transformers Auto classes with the `generate()` function. Here's an example:
82
+
83
+ ```py
84
+ import torch
85
+ from transformers import AutoTokenizer, AutoModelForCausalLM
86
+
87
+ model_id = "Writer/palmyra-mini-thinking-a"
88
+
89
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
90
+
91
+ model = AutoModelForCausalLM.from_pretrained(
92
+ model_id,
93
+ torch_dtype=torch.float16,
94
+ device_map="auto",
95
+ attn_implementation="flash_attention_2",
96
+ )
97
+
98
+ messages = [
99
+ {
100
+ "role": "user",
101
+ "content": "You have a 3-liter jug and a 5-liter jug. How can you measure exactly 4 liters of water?"
102
+ }
103
+ ],
104
+
105
+ input_ids = tokenizer.apply_chat_template(
106
+ messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
107
+ )
108
+
109
+ gen_conf = {
110
+ "max_new_tokens": 256,
111
+ "eos_token_id": tokenizer.eos_token_id,
112
+ "temperature": 0.3,
113
+ "top_p": 0.9,
114
+ }
115
+
116
+ with torch.inference_mode():
117
+ output_id = model.generate(input_ids, **gen_conf)
118
+
119
+ output_text = tokenizer.decode(output_id[0][input_ids.shape[1] :])
120
+
121
+ print(output_text)
122
+ ```
123
+
124
+ ## Running with vLLM
125
+ ```py
126
+ vllm serve Writer/palmyra-mini-thinking-a
127
+ ```
128
+ ```py
129
+ curl -X POST http://localhost:8000/v1/chat/completions \
130
+ -H "Content-Type: application/json" \
131
+ -d '{
132
+ "model": "Writer/palmyra-mini-thinking-a",
133
+ "messages": [
134
+ {
135
+ "role": "user",
136
+ "content": "You have a 3-liter jug and a 5-liter jug. How can you measure exactly 4 liters of water?"
137
+ }
138
+ ],
139
+ "max_tokens": 8000,
140
+ "temperature": 0.2
141
+ }'
142
+ ```
143
+
144
+
145
+ ## Ethical Considerations
146
+
147
+ As with any language model, there is a potential for generating biased or inaccurate information. Users should be aware of these limitations and use the model responsibly.
148
+
149
+ ### Citation and Related Information
150
+
151
+ To cite this model:
152
+ ```
153
+ @misc{Palmyra-mini-thinking-a,
154
+ author = {Writer Engineering team},
155
+ title = {{Palmyra-mini: A powerful LLM designed for math and coding}},
156
+ howpublished = {\url{https://dev.writer.com}},
157
+ year = 2025,
158
+ month = Sep
159
+ }
160
+ ```
161
+ Contact Hello@writer.com