Views
No views yet

1cd dockerfile
2docker build -t [IMAGE_NAME] .docker run -itd --ipc host --gpus all [IMAGE_NAME] bashdocker exec -it [CONTAINER_ID] /bin/bash1cd [PATH_TO_THIS_REPO]
2pip install -e .--train_file specifies the path of training data in OREO experiments.--dataset specifies the path of training data in SFT experiments.--save_path specifies the path to save the model.--pretrain specifies the path to load the pretrained model. In OREO experiments, this should be the path to the SFT model.1cd example/scripts
2bash train_oreo_sft.sh1cd example/scripts
2bash train_oreo.shDeepSeekMath-7B-Instruct model,1cd example/scripts
2bash train_oreo_deepseek-math.shDeepSeekMath-7B-Instruct is already supervise fine-tuned, so we don't have an SFT phase here.1cd example/scripts
2bash train_oreo_alfworld_sft.sh1cd example/scripts
2bash train_oreo_alfworld.shantlr4-python3-runtime==4.11.0 installed.1cd example/scripts
2python ../scratch/run_qwen.py --model [PATH_TO_YOUR_MODEL] --save [SAVE_GENERATED_RESULTS_JSONL]1cd example/scripts
2python ../scratch/run_qwen.py --model [PATH_TO_YOUR_MODEL] --no_bos --save [SAVE_GENERATED_RESULTS_JSONL]--no_bos option here.1from vllm import LLM, SamplingParams
2from transformers import AutoTokenizer
3
4model_path = "jwhj/Qwen2.5-Math-1.5B-OREO"
5tokenizer = AutoTokenizer.from_pretrained(model_path)
6llm = LLM(model_path)
7params = SamplingParams(temperature=0, max_tokens=2048)
8
9message = [
10 {"role": "system", "content": "Please reason step by step, and put your final answer within \\boxed{}."},
11 {
12 "role": "user",
13 "content": "Janet\u2019s ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?",
14 },
15]
16prompt = tokenizer.apply_chat_template(message, tokenize=False, add_generation_prompt=True)
17
18result = llm.generate(prompt, params)
19print(result[0].outputs[0].text)First find the total number of eggs Janet has each day: $16$ eggs/day
Then subtract the number of eggs she eats for breakfast: $16-3=13$ eggs/day
Then subtract the number of eggs she bakes for her friends: $13-4=9$ eggs/day
Then multiply the number of eggs she sells by the price per egg to find her daily earnings: $9\cdot2=\boxed{18}$ dollars/daypython -m vllm.entrypoints.openai.api_server --model [PATH_TO_YOUR_MODEL]1cd example/scripts
2python ../scratch/run_alfworld_async.py --model [PATH_TO_YOUR_MODEL] --save_dir [SAVE_GENERATED_TRAJS]--split eval_in_distribution for seen environments.1@inproceedings{Wang2024OfflineRL,
2 title={Offline Reinforcement Learning for LLM Multi-Step Reasoning},
3 author={Huaijie Wang and Shibo Hao and Hanze Dong and Shenao Zhang and Yilin Bao and Ziran Yang and Yi Wu},
4 year={2024},
5 url={https://api.semanticscholar.org/CorpusID:274965107}
6}