Run this model with HF Jobs
Run umd-zhou-lab/claude2-alpaca-13B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use umd-zhou-lab/claude2-alpaca-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use umd-zhou-lab/claude2-alpaca-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="umd-zhou-lab/claude2-alpaca-13B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("umd-zhou-lab/claude2-alpaca-13B") model = AutoModelForCausalLM.from_pretrained("umd-zhou-lab/claude2-alpaca-13B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use umd-zhou-lab/claude2-alpaca-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "umd-zhou-lab/claude2-alpaca-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "umd-zhou-lab/claude2-alpaca-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/umd-zhou-lab/claude2-alpaca-13B
- SGLang
How to use umd-zhou-lab/claude2-alpaca-13B 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 "umd-zhou-lab/claude2-alpaca-13B" \ --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": "umd-zhou-lab/claude2-alpaca-13B", "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 "umd-zhou-lab/claude2-alpaca-13B" \ --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": "umd-zhou-lab/claude2-alpaca-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use umd-zhou-lab/claude2-alpaca-13B with Docker Model Runner:
docker model run hf.co/umd-zhou-lab/claude2-alpaca-13B
Model Card for umd-zhou-lab/claude2-alpaca-13B
This model is trained by fine-tuning llama-2 with claude2 alpaca data.
Model Details
Model Description
- Developed by: UMD Tianyi Zhou Lab
- Model type: An auto-regressive language model based on the transformer architecture
- License: Llama 2 Community License Agreement
- Finetuned from model: meta-llama/Llama-2-13b
Model Sources
- GitHub: Claude2-Alpaca
- Data: claude2_alpaca
Uses
The primary use of this model is research on large language models and chatbots. The primary intended users of the model are researchers and hobbyists in natural language processing, machine learning, and artificial intelligence.
Training
We use the prompt from Stanford Alpaca
| Hyperparameter | Global Batch Size | Learning rate | Epochs | Max length | Weight decay |
|---|---|---|---|---|---|
| Model (13B) | 128 | 1e-5 | 5 | 2048 | 0 |
Performance
Compared to the llama2-chat, our models can have better average performance.
| Average | ARC | HellaSwag | MMLU | TruthfulQA | Alpaca_Eval | Avg Length | |
|---|---|---|---|---|---|---|---|
| Llama-2-7b-chat | 56.335 | 52.9 | 78.55 | 48.32 | 45.57 | 71.37 | 1479 |
| Llama-2-13b-chat | 59.935 | 59.04 | 81.94 | 54.64 | 44.12 | 81.09 | 1513 |
| claude_alpaca-7b | 57.78 | 56.66 | 81.17 | 46.58 | 46.71 | 71.23 | 1066 |
| claude_alpaca-13b | 61.29 | 61.18 | 84.08 | 55.74 | 44.18 | 78.93 | 1127 |
Citation
Please consider citing our paper if you think our codes, data, or models are useful. Thank you!
@misc{claude2-alpaca,
author = {Lichang Chen and Khalid Saifullah and Ming Li and Tianyi Zhou and Heng Huang},
title = {Claude2-Alpaca: Instruction tuning datasets distilled from claude},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/Lichang-Chen/claude2-alpaca}},
}
- Downloads last month
- 97