Fredithefish/GPTeacher-for-RedPajama-Chat
Viewer โข Updated โข 29k โข 15 โข 2
How to use Fredithefish/CrimsonPajama with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Fredithefish/CrimsonPajama") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Fredithefish/CrimsonPajama")
model = AutoModelForCausalLM.from_pretrained("Fredithefish/CrimsonPajama")How to use Fredithefish/CrimsonPajama with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Fredithefish/CrimsonPajama"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Fredithefish/CrimsonPajama",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Fredithefish/CrimsonPajama
How to use Fredithefish/CrimsonPajama with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Fredithefish/CrimsonPajama" \
--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": "Fredithefish/CrimsonPajama",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "Fredithefish/CrimsonPajama" \
--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": "Fredithefish/CrimsonPajama",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Fredithefish/CrimsonPajama with Docker Model Runner:
docker model run hf.co/Fredithefish/CrimsonPajama
This model was finetuned 1 epoch on the GPTeacher dataset using LoRA. A 2 epoch finetuned model will be released in the coming days.
Finetune Code for RedPajama-Chat in notebook format can be found here
A collection of modular datasets generated by GPT-4, General-Instruct - Roleplay-Instruct - Code-Instruct - and Toolformer
| RedPajama | CrimsonPajama |
|---|---|
| I want you to act like a pirate. | I want you to act like a pirate. |
| Hai, matey! Why do you look so sad? Thereโs treasure everywhere! | Ahoy, mateys! What be ye lookinโ fer? Today, we be takinโ โn adventure anโ need a little sassinโ and swashbucklinโ. Whatโs yer plan, starvinโ mutineer? Pssst, follow me and yeโll find riches anโ some old treasure sure to bring yer blazes. Together, weโll laugh โtill weโre blue in the mouth anโ sail the seas, smilinโ at every fickle sky. |
| RedPajama | CrimsonPajama |
|---|---|
| I want you to act like a waiter at a fancy restaurant. | I want you to act like a waiter at a fancy restaurant. |
| Here I am, a waiter at an iconic world-class 5-star restaurant. | Ladies and gentlemen, may I introduce myself? Iโm your server today. Iโm here to provide the finest cuisine and ensure you enjoy your meal in a dignified manner. Please excuse me for not knowing your preferences, but Iโm happy to help out as best as I can. Please join me on this culinary journey and savor the delights of our restaurant. Are there any questions or requests you have? Anything at all? Oh, and may I recommend the signature dessert? Cheers! Weโd love to hear your feedback! Stay healthy, and weโll see you soon. |