Text Generation
Transformers
Safetensors
English
gpt_neox
human feedback
rlhf
preferences
alignment
HALO
halos
dpo
rl
text-generation-inference
Instructions to use ContextualAI/archangel_sft-ppo_pythia6-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ContextualAI/archangel_sft-ppo_pythia6-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ContextualAI/archangel_sft-ppo_pythia6-9b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ContextualAI/archangel_sft-ppo_pythia6-9b") model = AutoModelForCausalLM.from_pretrained("ContextualAI/archangel_sft-ppo_pythia6-9b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ContextualAI/archangel_sft-ppo_pythia6-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ContextualAI/archangel_sft-ppo_pythia6-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ContextualAI/archangel_sft-ppo_pythia6-9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ContextualAI/archangel_sft-ppo_pythia6-9b
- SGLang
How to use ContextualAI/archangel_sft-ppo_pythia6-9b 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 "ContextualAI/archangel_sft-ppo_pythia6-9b" \ --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": "ContextualAI/archangel_sft-ppo_pythia6-9b", "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 "ContextualAI/archangel_sft-ppo_pythia6-9b" \ --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": "ContextualAI/archangel_sft-ppo_pythia6-9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ContextualAI/archangel_sft-ppo_pythia6-9b with Docker Model Runner:
docker model run hf.co/ContextualAI/archangel_sft-ppo_pythia6-9b
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -26,8 +26,19 @@ This repo contains the model checkpoints for:
|
|
| 26 |
- optimized with the loss <b>SFT+PPO</b>
|
| 27 |
- aligned using the SHP, Anthropic HH and Open Assistant datasets.
|
| 28 |
|
| 29 |
-
To prompt
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
Please refer to our [code repository](https://github.com/ContextualAI/HALOs) or [blog](https://contextual.ai/better-cheaper-faster-llm-alignment-with-kto/) which contains intructions for training your own HALOs and links to our model cards.
|
| 33 |
|
|
|
|
| 26 |
- optimized with the loss <b>SFT+PPO</b>
|
| 27 |
- aligned using the SHP, Anthropic HH and Open Assistant datasets.
|
| 28 |
|
| 29 |
+
To prompt Archangel models, ensure that the format is consistent with that of TuluV2.
|
| 30 |
+
For example, a prompt should be formatted as follows, where `<|user|>` corresponds to the human's role and `<|assistant|>` corresponds to the LLM's role.
|
| 31 |
+
The human should speak first:
|
| 32 |
+
```
|
| 33 |
+
<|user|>
|
| 34 |
+
Hi! I'm looking for a cake recipe.
|
| 35 |
+
<|assistant|>
|
| 36 |
+
What kind of cake?
|
| 37 |
+
<|user|>
|
| 38 |
+
Chocolate cake.
|
| 39 |
+
<|assistant|>
|
| 40 |
+
```
|
| 41 |
+
Note that a beginning-of-sequence (BOS) token is automatically added by all Archangel models during tokenization and does not have to be added by you. No end-of-sequence (EOS) token is added to the prompt.
|
| 42 |
|
| 43 |
Please refer to our [code repository](https://github.com/ContextualAI/HALOs) or [blog](https://contextual.ai/better-cheaper-faster-llm-alignment-with-kto/) which contains intructions for training your own HALOs and links to our model cards.
|
| 44 |
|