datajuicer/alpaca-cot-en-refined-by-data-juicer
Viewer • Updated • 5 • 15
How to use datajuicer/LLaMA-7B-EN-Chat-40k with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="datajuicer/LLaMA-7B-EN-Chat-40k") # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("datajuicer/LLaMA-7B-EN-Chat-40k")
model = AutoModelForMultimodalLM.from_pretrained("datajuicer/LLaMA-7B-EN-Chat-40k")How to use datajuicer/LLaMA-7B-EN-Chat-40k with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "datajuicer/LLaMA-7B-EN-Chat-40k"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "datajuicer/LLaMA-7B-EN-Chat-40k",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/datajuicer/LLaMA-7B-EN-Chat-40k
How to use datajuicer/LLaMA-7B-EN-Chat-40k with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "datajuicer/LLaMA-7B-EN-Chat-40k" \
--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": "datajuicer/LLaMA-7B-EN-Chat-40k",
"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 "datajuicer/LLaMA-7B-EN-Chat-40k" \
--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": "datajuicer/LLaMA-7B-EN-Chat-40k",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use datajuicer/LLaMA-7B-EN-Chat-40k with Docker Model Runner:
docker model run hf.co/datajuicer/LLaMA-7B-EN-Chat-40k
Our first data-centric LLM competition begins! Please visit the competition's official websites, FT-Data Ranker (1B Track, 7B Track), for more information.
This is a reference LLM from Data-Juicer.
The model architecture is LLaMA-7B and we built it upon the pre-trained checkpoint. The model is fine-trained on 40k English chat samples of Data-Juicer's refined alpaca-CoT data. It beats LLaMA-7B fine-tuned on 52k Alpaca samples in GPT-4 evaluation.
For more details, please refer to our paper.