File size: 3,907 Bytes
bd6e8b2
86b46ed
 
286bc5c
 
86b46ed
 
 
 
286bc5c
6b6fd36
 
86b46ed
 
bd6e8b2
286bc5c
 
 
 
e73aa55
86b46ed
 
 
 
 
 
 
ded8b50
86b46ed
 
 
 
286bc5c
86b46ed
 
286bc5c
86b46ed
286bc5c
86b46ed
286bc5c
86b46ed
286bc5c
86b46ed
286bc5c
86b46ed
286bc5c
86b46ed
286bc5c
86b46ed
286bc5c
 
86b46ed
286bc5c
86b46ed
286bc5c
 
86b46ed
 
286bc5c
 
 
86b46ed
286bc5c
86b46ed
286bc5c
86b46ed
6b6fd36
9e0c64b
6b6fd36
 
 
 
286bc5c
86b46ed
286bc5c
86b46ed
 
286bc5c
 
 
 
 
 
 
 
 
 
 
86b46ed
 
286bc5c
86b46ed
 
286bc5c
6b6fd36
286bc5c
e73aa55
6b6fd36
 
 
 
286bc5c
 
86b46ed
6b6fd36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
language:
- en
datasets:
- English
tags:
- text generation
- pytorch
- causal-lm
- Writer-data
- gpt
- NeMo
pipeline_tag: text-generation
library_name: transformers
---

license: cc-by-4.0


# Palmyra-base

<style>
img {
 display: inline;
}
</style>

|[![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 was primarily pretrained with English text, 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 is a member of the same family of models that only contain a decoder. As a result, it was pretrained utilizing the objective of self-supervised causal language modeling. Palmyra uses the prompts and general experimental setup from GPT-3 in order to conduct its evaluation in accordance with GPT-3. Read the official paper if you want more information about this.


## Training data

Palmyra-base 5b was trained on Writer 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. The model is best at what it was pretrained for however, 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'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, keep in mind that the statistically most likely next token is not always the token that produces the most "accurate" text. Never rely on Palmyra to produce factually correct results.

Palmyra was trained on Writer custom data. As with all language models, it is difficult to predict how Palmyra 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.

### Use case
Palmyra-base is extremely powerful while also being extremely fast. While Palmyra-large is better at analyzing complex text, Palmyra-base is capable of many nuanced tasks such as sentiment classification and summarization. Palmyra-base is also effective as a general service chatbot, answering questions and performing Q&A.

Competent in: complex classification, text sentiment, and summarization


## 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 
}
```