Instructions to use GanjinZero/wombat-7b-delta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GanjinZero/wombat-7b-delta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GanjinZero/wombat-7b-delta")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GanjinZero/wombat-7b-delta") model = AutoModelForCausalLM.from_pretrained("GanjinZero/wombat-7b-delta") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GanjinZero/wombat-7b-delta with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GanjinZero/wombat-7b-delta" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GanjinZero/wombat-7b-delta", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GanjinZero/wombat-7b-delta
- SGLang
How to use GanjinZero/wombat-7b-delta 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 "GanjinZero/wombat-7b-delta" \ --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": "GanjinZero/wombat-7b-delta", "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 "GanjinZero/wombat-7b-delta" \ --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": "GanjinZero/wombat-7b-delta", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GanjinZero/wombat-7b-delta with Docker Model Runner:
docker model run hf.co/GanjinZero/wombat-7b-delta
Commit ·
e8ddd2b
1
Parent(s): 6d8b75d
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- tatsu-lab/alpaca
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
---
|
| 7 |
+
## Model details
|
| 8 |
+
|
| 9 |
+
**Organization developing the model**
|
| 10 |
+
Alibaba DAMO Academy, Tsinghua University
|
| 11 |
+
|
| 12 |
+
**Model date**
|
| 13 |
+
Wombat-7B was released at 2023/04/13.
|
| 14 |
+
|
| 15 |
+
**Model version**
|
| 16 |
+
Wombat-7B
|
| 17 |
+
|
| 18 |
+
**Training dataset**
|
| 19 |
+
The training data of Wombat-7B is released in the [RRHF](https://github.com/GanjinZero/RRHF).
|
| 20 |
+
|
| 21 |
+
**Model type**
|
| 22 |
+
Wombat-7B is a general-purpose instruction-following language model aligned with chatGPT (as proxy human preferences), fine-tuned from Alpaca models.
|
| 23 |
+
We use a novel method named RRHF (Rank Response to align Human Feedback) to fine-tune Alpaca.
|
| 24 |
+
|
| 25 |
+
**How to use**
|
| 26 |
+
To recover Wombats from delta parameters:
|
| 27 |
+
```bash
|
| 28 |
+
python apply_delta.py \
|
| 29 |
+
--base ./llama-7b \
|
| 30 |
+
--target ./wombat-7b \
|
| 31 |
+
--delta GanjinZero/wombat-7b-delta
|
| 32 |
+
```
|
| 33 |
+
where **apply_delta.py** is from [code](https://github.com/GanjinZero/RRHF/blob/main/apply_delta.py).
|
| 34 |
+
|
| 35 |
+
To infer with Wombats: Please refer to [code](https://github.com/GanjinZero/RRHF/blob/main/single_sentence_inference.py).
|
| 36 |
+
|
| 37 |
+
**Citations details**
|
| 38 |
+
Please cite our paper on Arxiv:
|
| 39 |
+
```
|
| 40 |
+
@misc{yuan2023rrhf,
|
| 41 |
+
title={RRHF: Rank Responses to Align Language Models with Human Feedback without tears},
|
| 42 |
+
author={Zheng Yuan and Hongyi Yuan and Chuanqi Tan and Wei Wang and Songfang Huang and Fei Huang},
|
| 43 |
+
year={2023},
|
| 44 |
+
eprint={2304.05302},
|
| 45 |
+
archivePrefix={arXiv},
|
| 46 |
+
primaryClass={cs.CL}
|
| 47 |
+
}
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
**License**
|
| 51 |
+
Data are licensed under the CC BY NC 4.0 license.
|
| 52 |
+
|
| 53 |
+
**Where to send questions or comments about the model**
|
| 54 |
+
Questions, comments, and discussions about Wombats and RRHF can be sent via the [GitHub repository](https://github.com/GanjinZero/RRHF) of the project, by opening an issue.
|
| 55 |
+
or send emails to yuanzheng.yuanzhen@alibaba-inc.com, yuanhy20@mails.tsinghua.edu.cn or chuanqi.tcq@alibaba-inc.com.
|
| 56 |
+
|
| 57 |
+
**Primary intended uses**
|
| 58 |
+
The primary use of Wombat-7B and Wombat-7B-GPT4 is research on learning from human feedback and is a prototype of RRHF methods.
|
| 59 |
+
|
| 60 |
+
**Primary intended users**
|
| 61 |
+
The primary intended users of Wombat-7B and Wombat-7B-GPT4 are researchers in natural language processing, machine learning and artificial intelligence.
|
| 62 |
+
|
| 63 |
+
**Out-of-scope use cases**
|
| 64 |
+
Wombat-7B and Wombat-7B-GPT4 are not finetuned with proxy human feedback of OpenAI chatGPT and GPT4 and are not intended for use in production systems.
|
| 65 |
+
Any usage must not be competing with the OpenAI API.
|