Instructions to use WeOpenML/Alpaca-7B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WeOpenML/Alpaca-7B-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WeOpenML/Alpaca-7B-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WeOpenML/Alpaca-7B-v1") model = AutoModelForCausalLM.from_pretrained("WeOpenML/Alpaca-7B-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use WeOpenML/Alpaca-7B-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WeOpenML/Alpaca-7B-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WeOpenML/Alpaca-7B-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WeOpenML/Alpaca-7B-v1
- SGLang
How to use WeOpenML/Alpaca-7B-v1 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 "WeOpenML/Alpaca-7B-v1" \ --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": "WeOpenML/Alpaca-7B-v1", "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 "WeOpenML/Alpaca-7B-v1" \ --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": "WeOpenML/Alpaca-7B-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WeOpenML/Alpaca-7B-v1 with Docker Model Runner:
docker model run hf.co/WeOpenML/Alpaca-7B-v1
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
PandaLM
We are glad to introduce the original version of Alpaca based on PandaLM project. To highlight the effectiveness of using PandaLM-7B for instruction tuning LLMs, we check the performance of models tuned with PandaLMβs selected optimal hyperparameters. This version and original alpaca version have been submitted to hugging face Open LLM Leaderboard.
the full checkpoint has been uploaded to the Hugging face, so you can just load the model and tokenizer for downstream tasks.
from transformers import AutoTokenizer,AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("WeOpenML/Alpaca-7B-v1",use_fast=False)
model = AutoModelForCausalLM.from_pretrained("WeOpenML/Alpaca-7B-v1")
For more information about PandaLM, pls check out our github, our paper and PandaLM model. The repo is under Apache License 2.0.
Updates
- 2023.7.21: We updated the model card and basic info.
- 2023.7.18: We released the checkpoint on the Hugging face.
Citation
@misc{pandalm2023,
title={PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization},
author={Wang, Yidong and Yu, Zhuohao and Zeng, Zhengran and Yang, Linyi and Wang, Cunxiang and Chen, Hao and Jiang, Chaoya and Xie, Rui and Wang, Jindong and Xie, Xing and Ye, Wei and Zhang, Shikun and Zhang, Yue},
year={2023},
journal={arXiv preprint arXiv:2306.05087}
}
@misc{PandaLM,
author = {Wang, Yidong and Yu, Zhuohao and Zeng, Zhengran and Yang, Linyi and Heng, Qiang and Wang, Cunxiang and Chen, Hao and Jiang, Chaoya and Xie, Rui and Wang, Jindong and Xie, Xing and Ye, Wei and Zhang, Shikun and Zhang, Yue},
title = {PandaLM: Reproducible and Automated Language Model Assessment},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/WeOpenML/PandaLM}},
}
- Downloads last month
- 1,017
docker model run hf.co/WeOpenML/Alpaca-7B-v1