Instructions to use GreatCaptainNemo/ProLLaMA_Stage_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GreatCaptainNemo/ProLLaMA_Stage_1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GreatCaptainNemo/ProLLaMA_Stage_1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GreatCaptainNemo/ProLLaMA_Stage_1") model = AutoModelForCausalLM.from_pretrained("GreatCaptainNemo/ProLLaMA_Stage_1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GreatCaptainNemo/ProLLaMA_Stage_1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GreatCaptainNemo/ProLLaMA_Stage_1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GreatCaptainNemo/ProLLaMA_Stage_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GreatCaptainNemo/ProLLaMA_Stage_1
- SGLang
How to use GreatCaptainNemo/ProLLaMA_Stage_1 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 "GreatCaptainNemo/ProLLaMA_Stage_1" \ --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": "GreatCaptainNemo/ProLLaMA_Stage_1", "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 "GreatCaptainNemo/ProLLaMA_Stage_1" \ --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": "GreatCaptainNemo/ProLLaMA_Stage_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GreatCaptainNemo/ProLLaMA_Stage_1 with Docker Model Runner:
docker model run hf.co/GreatCaptainNemo/ProLLaMA_Stage_1
Commit History
-
Improve model card: Add metadata, abstract, update GitHub link, and refine usage
Verified signatureThis PR enhances the model card for ProLLaMA by: - Adding `pipeline_tag: text-generation` to improve discoverability on the Hugging Face Hub. - Adding `library_name: transformers` to enable the automated "how to use" widget. - Adding `tags: - protein-language-model` for better categorization. - Updating the GitHub repository link to `https://github.com/PKU-YuanGroup/ProLLaMA` as indicated in the project's official GitHub README. - Including the paper's abstract for a comprehensive overview of the model. - Refining the usage section to incorporate the input format and a concise Python inference example directly from the GitHub README's "Quick Inference" section, providing a clear and functional `transformers` usage snippet. These changes will significantly improve the model's visibility, context, and user experience on the Hugging Face Hub.2886b73
-
Update README.md
Verified signaturea0c8f58
-
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (633540a3c1c6102575730e08cceefdfe3ab48219) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>599e4e2
-
Update README.md
Verified signature0bcd6ed
-
Update README.md
Verified signaturea1963ae
-
Update config.json
Verified signatureFix a bug resulting from the transformers/models/llama/convert_llama_weights_to_hf.py.ded5fb5
-
Update README.md
Verified signature1d7e28c -
Update README.md
Verified signaturef8407d3
-
Create README.md
Verified signature5d9b5f6 -
Upload 4 files
Verified signature5da7aa0 -
Upload 4 files
Verified signature24c06bf -
initial commit
Verified signature3e7bbdd