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")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Writer/palmyra-small") model = AutoModelForCausalLM.from_pretrained("Writer/palmyra-small") - 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
Adding `safetensors` variant of this model (#5) 1f92adf
Update README.md db0fb2f
Update README.md 5848cca
Update README.md e60f88f
Update README.md 8d3cdb5
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 09bc830
Waseem AlShikh commited on