Text Generation
Transformers
PyTorch
Safetensors
English
gpt2
text generation
causal-lm
Writer-data
NeMo
palmyra
text-generation-inference
Instructions to use Writer/palmyra-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Writer/palmyra-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Writer/palmyra-3B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Writer/palmyra-3B") model = AutoModelForCausalLM.from_pretrained("Writer/palmyra-3B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Writer/palmyra-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Writer/palmyra-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Writer/palmyra-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Writer/palmyra-3B
- SGLang
How to use Writer/palmyra-3B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Writer/palmyra-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Writer/palmyra-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Writer/palmyra-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Writer/palmyra-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Writer/palmyra-3B with Docker Model Runner:
docker model run hf.co/Writer/palmyra-3B
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,19 +29,19 @@ img {
|
|
| 29 |
|
| 30 |
## Model Description
|
| 31 |
|
| 32 |
-
Palmyra 3B 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
|
| 33 |
|
| 34 |
## Use case
|
| 35 |
-
Palmyra
|
| 36 |
|
| 37 |
|
| 38 |
## Training data
|
| 39 |
|
| 40 |
-
Palmyra
|
| 41 |
|
| 42 |
## Intended Use and Limitations
|
| 43 |
|
| 44 |
-
Palmyra
|
| 45 |
|
| 46 |
### How to use
|
| 47 |
|
|
@@ -56,9 +56,9 @@ tokenizer = AutoTokenizer.from_pretrained("Writer/palmyra-long")
|
|
| 56 |
|
| 57 |
### Limitations and Biases
|
| 58 |
|
| 59 |
-
Palmyra
|
| 60 |
|
| 61 |
-
Palmyra
|
| 62 |
|
| 63 |
|
| 64 |
## Citation and Related Information
|
|
|
|
| 29 |
|
| 30 |
## Model Description
|
| 31 |
|
| 32 |
+
Palmyra 3B 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 3B 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 Long uses the prompts and general experimental setup from GPT-3 in order to conduct its evaluation per GPT-3.
|
| 33 |
|
| 34 |
## Use case
|
| 35 |
+
Palmyra 3B is the fastest of Writer’s LLMs and can perform important tasks such as text parsing, simple classification, address correction, and keyword recognition. Providing more context drives even better performance.
|
| 36 |
|
| 37 |
|
| 38 |
## Training data
|
| 39 |
|
| 40 |
+
Palmyra 3B was trained on Writer’s custom dataset.
|
| 41 |
|
| 42 |
## Intended Use and Limitations
|
| 43 |
|
| 44 |
+
Palmyra 3B 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.
|
| 45 |
|
| 46 |
### How to use
|
| 47 |
|
|
|
|
| 56 |
|
| 57 |
### Limitations and Biases
|
| 58 |
|
| 59 |
+
Palmyra 3B 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 next statistically likely token is not always the token that produces the most "accurate" text. Never rely on Palmyra Long to produce factually correct results.
|
| 60 |
|
| 61 |
+
Palmyra 3B was trained on Writer’s custom data. As with all language models, it is difficult to predict how Palmyra Long 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.
|
| 62 |
|
| 63 |
|
| 64 |
## Citation and Related Information
|