Instructions to use lil-lab/respect with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lil-lab/respect with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lil-lab/respect")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lil-lab/respect", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lil-lab/respect with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lil-lab/respect" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lil-lab/respect", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lil-lab/respect
- SGLang
How to use lil-lab/respect 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 "lil-lab/respect" \ --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": "lil-lab/respect", "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 "lil-lab/respect" \ --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": "lil-lab/respect", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lil-lab/respect with Docker Model Runner:
docker model run hf.co/lil-lab/respect
fix name
#2
by chenzizhao - opened
README.md
CHANGED
|
@@ -10,14 +10,7 @@ library_name: transformers
|
|
| 10 |
|
| 11 |
# The Era of Real-World Human Interaction: RL from User Conversations
|
| 12 |
|
| 13 |
-
This repository contains the `lil-lab/respect` model, based on the paper [
|
| 14 |
-
|
| 15 |
-
## Model Description
|
| 16 |
-
The model introduces Reinforcement Learning from Human Interaction (RLHI), a paradigm that learns directly from in-the-wild user conversations to achieve continual model improvement and multifaceted alignment. It develops two complementary methods: (1) RLHI with User-Guided Rewrites, which revises unsatisfactory model outputs based on users' natural-language follow-up responses, and (2) RLHI with User-Based Rewards, which learns via a reward model conditioned on knowledge of the user's long-term interaction history (termed persona). These methods link long-term user personas to turn-level preferences via persona-conditioned preference optimization.
|
| 17 |
-
|
| 18 |
-
## Project Resources
|
| 19 |
-
* **Project Page:** [https://lil-lab.github.io/respect](https://lil-lab.github.io/respect)
|
| 20 |
-
* **Code Repository:** [https://github.com/lil-lab/respect](https://github.com/lil-lab/respect)
|
| 21 |
|
| 22 |
## Sample Usage
|
| 23 |
|
|
@@ -60,4 +53,5 @@ peft_model = PeftModel.from_pretrained(
|
|
| 60 |
```
|
| 61 |
|
| 62 |
## Reproducibility
|
| 63 |
-
|
|
|
|
|
|
| 10 |
|
| 11 |
# The Era of Real-World Human Interaction: RL from User Conversations
|
| 12 |
|
| 13 |
+
This repository contains the `lil-lab/respect` model, based on the ACL paper [Retrospective Learning from Interactions](https://huggingface.co/papers/2410.13852). For more resources, please see <https://lil-lab.github.io/respect> and <https://github.com/lil-lab/respect>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
## Sample Usage
|
| 16 |
|
|
|
|
| 53 |
```
|
| 54 |
|
| 55 |
## Reproducibility
|
| 56 |
+
|
| 57 |
+
To generate plots from the paper, run `analysis/plots.ipynb` in the [GitHub repository](https://github.com/lil-lab/respect).
|