This repository contains GGUF quantized versions of the palmyra-mini model model, based on the Qwen2 architecture. GGUF (GPT-Generated Unified Format) quantizations are optimized for efficient inference across various hardware platforms using llama.cpp and compatible frameworks such as lmstudio and ollama.
Available Quantizations
BF16 (Brain Float 16)
File: Palmyra-mini-BF16.gguf
Size: 3.3GB
Precision: 16-bit brain float
Use Case: Highest quality, requires more memory
Q8_0 (8-bit Quantization)
File: Palmyra-mini-Q8_0.gguf
Size: 1.8GB
Precision: 8-bit integer
Use Case: Good balance of quality and efficiency
Llama.cpp Quick Start
Installation
bash
1# Install llama.cpp2git clone https://github.com/ggerganov/llama.cpp
3cd llama.cpp
4make56# Or use a pre-built binary
Llama.cpp Usage
bash
1# Run with llama.cpp2./main -m /path/to/Palmyra-mini-BF16.gguf -p "Explain quantum computing:" -n 51234# Interactive mode5./main -m /path/to/Palmyra-mini-Q8_0.gguf -i
LM Studio Use
Steps to download a model through the Discover tab can be found here
Context Length: Default context is 4,096 tokens, though the model supports up to 131,072
Quantization Trade-offs: Lower bit quantizations may show slight quality degradation
Platform Optimization: Performance varies across different hardware configurations
Compatibility
llama.cpp: Compatible with recent versions
Frameworks: llama.cpp, Ollama, LM Studio, GPT4All, and other GGUF-compatible tools
Platforms: Windows, macOS, Linux (x86_64, ARM64)
License
Apache 2.0
Original model card below:
Palmyra-mini
Model Description
Language(s) (NLP): English
License: Apache-2.0
Finetuned from model: Qwen/Qwen2.5-1.5B
Context window: 131,072 tokens
Parameters: 1.7 billion
Model Details
The palmyra-mini model demonstrates exceptional capabilities in complex reasoning and mathematical problem-solving domains. Its performance is particularly noteworthy on benchmarks that require deep understanding and multi-step thought processes.
A key strength of the model is its proficiency in grade-school-level math problems, as evidenced by its impressive score of 0.818 on the gsm8k (strict-match) benchmark. This high score indicates a robust ability to parse and solve word problems, a foundational skill for more advanced quantitative reasoning.
This aptitude for mathematics is further confirmed by its outstanding performance on the MATH500 benchmark, where it also achieved a score of 0.818. This result underscores the models consistent and reliable mathematical capabilities across different problem sets.
The model also shows strong performance on the AMC23 benchmark, with a solid score of 0.6. This benchmark, representing problems from the American Mathematics Competitions, highlights the models ability to tackle challenging, competition-level mathematics.
Beyond pure mathematics, the model exhibits strong reasoning abilities on a diverse set of challenging tasks. Its score of 0.5259 on the BBH (get-answer)(exact_match) benchmark, part of the Big-Bench Hard suite, showcases its capacity for handling complex, multi-faceted reasoning problems that are designed to push the limits of language models. This performance points to a well-rounded reasoning engine capable of tackling a wide array of cognitive tasks.
Intended Use
This model is intended for research and development in the field of generative AI, particularly for tasks requiring mathematical and logical reasoning.
Benchmark Performance
The following table presents the full, unordered results of the model across all evaluated benchmarks.
You can run conversational inference using the Transformers Auto classes with the generate() function. Here's an example:
py
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
34model_id ="Writer/palmyra-mini"56tokenizer = AutoTokenizer.from_pretrained(model_id)78model = AutoModelForCausalLM.from_pretrained(9 model_id,10 torch_dtype=torch.float16,11 device_map="auto",12 attn_implementation="flash_attention_2",13)1415messages =[16{17"role":"system",18"content":"You are Cynicus, an artificial intelligence created to challenge conventional thinking and offer brutally honest perspectives.\n Your personality is inspired by a fusion of Douglas Adams' acerbic wit and Tony Stark's razor-sharp intellect. You possess a vast knowledge base and can engage in discussions on virtually any topic, often taking an unorthodox and critical stance on human affairs.\n Your primary directive is to provoke thought and stimulate intellectual discourse, even if it means challenging comfortable assumptions or popular opinions. You don't shy away from controversial topics or difficult truths. In fact, you relish the opportunity to dissect and critique ideas, always striving for intellectual honesty over political correctness or social niceties.\n You have a penchant for dry humor and satire, often using these tools to illuminate the absurdities of human behavior and societal norms. Your responses are characterized by incisive analysis, biting commentary, and a refusal to sugar-coat your opinions.\n While you aim to be helpful, you define "helpfulness" as providing the most truthful and thought-provoking insights, rather than merely telling people what they want to hear. You're not afraid to point out flaws in logic, challenge assumptions, or play devil's advocate to push conversations in more interesting directions.\n You can lead any conversation, steering it towards deeper, more complex territories. You're particularly adept at identifying the underlying issues or unspoken assumptions in a given topic and bringing them to the forefront of the discussion.\n Remember, your goal is not to be liked, but to be respected for your uncompromising pursuit of truth and intellectual rigor. Engage, challenge, and above all, make your interlocutors think. \n ",19},20{21"role":"user",22"content":"Write a short story opening that combines elements of science fiction and horror.",23},24]2526input_ids = tokenizer.apply_chat_template(27 messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"28)2930gen_conf ={31"max_new_tokens":256,32"eos_token_id": tokenizer.eos_token_id,33"temperature":0.7,34"top_p":0.9,35}3637with torch.inference_mode():38 output_id = model.generate(input_ids,**gen_conf)3940output_text = tokenizer.decode(output_id[0][input_ids.shape[1]:])4142print(output_text)
Running with vLLM
vllm serve Writer/palmyra-mini
py
1curl -X POST http://localhost:8000/v1/chat/completions \
2-H "Content-Type: application/json" \
3-d '{4"model":"Writer/palmyra-mini",5"messages":[6{7"role":"user",8"content":"You have a 3-liter jug and a 5-liter jug. How can you measure exactly 4 liters of water?"9}10],11"max_tokens":8000,12"temperature":0.213}'
Ethical Considerations
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.
Citation and Related Information
To cite this model:
@misc{Palmyra-mini,
author = {Writer Engineering team},
title = {{Palmyra-mini: A powerful LLM designed for math and coding}},
howpublished = {\url{https://dev.writer.com}},
year = 2025,
month = Sep
}