--- language: - en datasets: - English tags: - text generation - pytorch - causal-lm - Writer-data - gpt - NeMo - palmyra pipeline_tag: text-generation library_name: transformers license: apache-2.0 --- # Palmyra Base 5B |[![Model architecture](https://img.shields.io/badge/Model%20Arch-Transformer%20Decoder-green)](#model-architecture)|[![Model size](https://img.shields.io/badge/Params-5B-green)](#model-architecture)|[![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets) ## Model Description Palmyra Base was primarily pre-trained with English text. Note that there is still a trace amount of non-English data present within the training corpus that was accessed through CommonCrawl. A causal language modeling (CLM) objective was utilized during the process of the model's pretraining. Similar to GPT-3, Palmyra Base is a member of the same family of models that only contain a decoder. As a result, it was pre-trained utilizing the objective of self-supervised causal language modeling. Palmyra Base uses the prompts and general experimental setup from GPT-3 in order to conduct its evaluation per GPT-3. ### Use case Palmyra Base is extremely powerful while being extremely fast. This model excels at many nuanced tasks such as sentiment classification and summarization. ## Training data Palmyra Base (5b) was trained on Writer’s custom dataset. ## Intended Use and Limitations Palmyra Base learns an inner representation of the English language that can be used to extract features useful for downstream tasks. However, the model is best at what it was pre-trained for which is generating text from a prompt. ### How to use This model can be easily loaded using the `AutoModelForCausalLM` functionality: ```python from transformers import AutoModelForCausalLM, AutoTokenizer import torch model = AutoModelForCausalLM.from_pretrained("Writer/palmyra-base", torch_dtype=torch.float16).cuda() # the fast tokenizer currently does not work correctly tokenizer = AutoTokenizer.from_pretrained("Writer/palmyra-base", use_fast=False) ``` ### Limitations and Biases Palmyra Base’s core functionality is to take a string of text and predict the next token. While language models are widely used for other tasks, there are many unknowns in this work. When prompting Palmyra Base, keep in mind that the next statistically likely token is not always the token that produces the most "accurate" text. Never rely on Palmyra Base to produce factually correct results. Palmyra Base was trained on Writer’s custom data. As with all language models, it is difficult to predict how Palmyra Base will respond to specific prompts, and offensive content may appear unexpectedly. We recommend that the outputs be curated or filtered by humans before they are released, both to censor undesirable content and to improve the quality of the results. ## Evaluation results Evaluation of Palmyra-base model on the SuperGLUE benchmark | Task | Metric | Value | |------------|--------|-------| | boolq | acc | 64.43 | | cb | acc | 10.71 | | | f1 | 08.32 | | copa | acc | 76.00 | | multirc | acc | 01.26 | | record | f1 | 84.02 | | | em | 83.29 | | wic | acc | 50.00 | | wsc | acc | 36.54 | ## Citation and Related Information To cite this model: ``` @misc{Palmyra, author = {Writer Engineering team}, title = {{Palmyra-base Parameter Autoregressive Language Model}}, howpublished = {\url{https://dev.writer.com}}, year = 2023, month = January } ``` # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_Writer__palmyra-base) | Metric | Value | |-----------------------|---------------------------| | Avg. | 30.84 | | ARC (25-shot) | 31.91 | | HellaSwag (10-shot) | 55.39 | | MMLU (5-shot) | 27.15 | | TruthfulQA (0-shot) | 37.57 | | Winogrande (5-shot) | 58.09 | | GSM8K (5-shot) | 0.99 | | DROP (3-shot) | 4.8 |