Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

Writer
/
InstructPalmyra-20b

Text Generation
Transformers
PyTorch
English
gpt2
InstructGPT
hf
palmyra
text-generation-inference
Model card Files Files and versions
xet
Community
8

Instructions to use Writer/InstructPalmyra-20b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Writer/InstructPalmyra-20b with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="Writer/InstructPalmyra-20b")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("Writer/InstructPalmyra-20b")
    model = AutoModelForCausalLM.from_pretrained("Writer/InstructPalmyra-20b")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use Writer/InstructPalmyra-20b with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "Writer/InstructPalmyra-20b"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Writer/InstructPalmyra-20b",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/Writer/InstructPalmyra-20b
  • SGLang

    How to use Writer/InstructPalmyra-20b 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/InstructPalmyra-20b" \
        --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/InstructPalmyra-20b",
    		"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/InstructPalmyra-20b" \
            --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/InstructPalmyra-20b",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use Writer/InstructPalmyra-20b with Docker Model Runner:

    docker model run hf.co/Writer/InstructPalmyra-20b
InstructPalmyra-20b
40.5 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 22 commits
kiranr's picture
kiranr
Update handler.py
d2f3e5e over 2 years ago
  • .gitattributes
    1.48 kB
    initial commit about 3 years ago
  • README.md
    5.53 kB
    Update README.md over 2 years ago
  • added_tokens.json
    21 Bytes
    add model files about 3 years ago
  • config.json
    820 Bytes
    Upload model almost 3 years ago
  • generation_config.json
    124 Bytes
    Upload model almost 3 years ago
  • handler.py
    1.55 kB
    Update handler.py over 2 years ago
  • merges.txt
    456 kB
    Upload tokenizer almost 3 years ago
  • pytorch_model-00001-of-00005.bin
    9.93 GB
    xet
    Upload model almost 3 years ago
  • pytorch_model-00002-of-00005.bin
    9.97 GB
    xet
    Upload model almost 3 years ago
  • pytorch_model-00003-of-00005.bin
    9.97 GB
    xet
    Upload model almost 3 years ago
  • pytorch_model-00004-of-00005.bin
    9.97 GB
    xet
    Upload model almost 3 years ago
  • pytorch_model-00005-of-00005.bin
    680 MB
    xet
    Upload model almost 3 years ago
  • pytorch_model.bin.index.json
    39.9 kB
    Upload model almost 3 years ago
  • special_tokens_map.json
    123 Bytes
    add model files about 3 years ago
  • tokenizer.json
    2.11 MB
    Upload tokenizer almost 3 years ago
  • tokenizer_config.json
    754 Bytes
    Upload tokenizer almost 3 years ago
  • vocab.json
    798 kB
    Upload tokenizer almost 3 years ago