Text Generation
Transformers
PyTorch
Core ML
Safetensors
English
gpt2
text generation
causal-lm
Writer-data
NeMo
palmyra
text-generation-inference
Instructions to use Writer/palmyra-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Writer/palmyra-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Writer/palmyra-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Writer/palmyra-small") model = AutoModelForCausalLM.from_pretrained("Writer/palmyra-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Writer/palmyra-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Writer/palmyra-small" # 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-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Writer/palmyra-small
- SGLang
How to use Writer/palmyra-small 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-small" \ --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-small", "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-small" \ --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-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Writer/palmyra-small with Docker Model Runner:
docker model run hf.co/Writer/palmyra-small
Commit History
-
Add Core ML conversion
Core ML conversion, task=text-generation, precision=float32f4fd8e1
-
Update README.md
e60f88f
-
Update README.md
8d3cdb5 -
minor fix (#1)
- minor fix (beaf7950c43519959ad36deeed374d672a2ad197)4fcd3c8 -
Update README.md
73a63c5
-
Update README.md
aa0d877 -
Update README.md
1e02428 -
Update README.md
da2657b -
Update README.md
1f7df6e -
Update README.md
71f4aac -
Update README.md
5c7c312 -
Update README.md
ee0810d
-
Update README.md
ac003c4 -
Update README.md
97d9cc6 -
Update README.md
2543d61 -
Update README.md
9047354 -
Update README.md
94bb2c3
-
128M model
Waseem AlShikh09bc830 -
initial commit
ea7d771