Instructions to use jojo0217/llm_rlhf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jojo0217/llm_rlhf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jojo0217/llm_rlhf")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jojo0217/llm_rlhf") model = AutoModelForCausalLM.from_pretrained("jojo0217/llm_rlhf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jojo0217/llm_rlhf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jojo0217/llm_rlhf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jojo0217/llm_rlhf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jojo0217/llm_rlhf
- SGLang
How to use jojo0217/llm_rlhf 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 "jojo0217/llm_rlhf" \ --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": "jojo0217/llm_rlhf", "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 "jojo0217/llm_rlhf" \ --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": "jojo0217/llm_rlhf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jojo0217/llm_rlhf with Docker Model Runner:
docker model run hf.co/jojo0217/llm_rlhf
Upload llm_10_shot_actor.json
Browse files- llm_10_shot_actor.json +47 -0
llm_10_shot_actor.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"results": {
|
| 3 |
+
"kobest_boolq": {
|
| 4 |
+
"acc": 0.6004273504273504,
|
| 5 |
+
"acc_stderr": 0.013076733548156574,
|
| 6 |
+
"macro_f1": 0.5383070602365428,
|
| 7 |
+
"macro_f1_stderr": 0.01360326947457233
|
| 8 |
+
},
|
| 9 |
+
"kobest_copa": {
|
| 10 |
+
"acc": 0.789,
|
| 11 |
+
"acc_stderr": 0.012909130321042099,
|
| 12 |
+
"macro_f1": 0.7887412079797753,
|
| 13 |
+
"macro_f1_stderr": 0.012915850547665574
|
| 14 |
+
},
|
| 15 |
+
"kobest_hellaswag": {
|
| 16 |
+
"acc": 0.5,
|
| 17 |
+
"acc_stderr": 0.022383074051792257,
|
| 18 |
+
"acc_norm": 0.586,
|
| 19 |
+
"acc_norm_stderr": 0.02204949796982787,
|
| 20 |
+
"macro_f1": 0.49550311762225463,
|
| 21 |
+
"macro_f1_stderr": 0.02234977157067147
|
| 22 |
+
},
|
| 23 |
+
"kobest_sentineg": {
|
| 24 |
+
"acc": 0.924433249370277,
|
| 25 |
+
"acc_stderr": 0.013281757903323496,
|
| 26 |
+
"macro_f1": 0.9242944317315027,
|
| 27 |
+
"macro_f1_stderr": 0.013286696883726102
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"versions": {
|
| 31 |
+
"kobest_boolq": 0,
|
| 32 |
+
"kobest_copa": 0,
|
| 33 |
+
"kobest_hellaswag": 0,
|
| 34 |
+
"kobest_sentineg": 0
|
| 35 |
+
},
|
| 36 |
+
"config": {
|
| 37 |
+
"model": "gpt2",
|
| 38 |
+
"model_args": "pretrained=/home/work/.folder/DeepSpeedExamples-master/applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/output/actor/",
|
| 39 |
+
"num_fewshot": 10,
|
| 40 |
+
"batch_size": "8",
|
| 41 |
+
"device": "cuda:0",
|
| 42 |
+
"no_cache": true,
|
| 43 |
+
"limit": null,
|
| 44 |
+
"bootstrap_iters": 100000,
|
| 45 |
+
"description_dict": {}
|
| 46 |
+
}
|
| 47 |
+
}
|