Spaces:
Paused
Paused
Download scripts/run_llm.sh from Leon4gr45/paper2code-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/spaces/Leon4gr45/paper2code-cli/resolve/main/scripts/run_llm.sh
- Command line
-
hf download hf://spaces/Leon4gr45/paper2code-cli/scripts/run_llm.sh
-
curl -L -o run_llm.sh https://huggingface.co/spaces/Leon4gr45/paper2code-cli/resolve/main/scripts/run_llm.sh
1.47 kB
| MODEL_NAME="deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct" | |
| TP_SIZE=2 | |
| PAPER_NAME="Transformer" | |
| PDF_PATH="../examples/Transformer.pdf" # .pdf | |
| PDF_JSON_PATH="../examples/Transformer.json" # .json | |
| PDF_JSON_CLEANED_PATH="../examples/Transformer_cleaned.json" # _cleaned.json | |
| OUTPUT_DIR="../outputs/Transformer_dscoder" | |
| OUTPUT_REPO_DIR="../outputs/Transformer_dscoder_repo" | |
| mkdir -p $OUTPUT_DIR | |
| mkdir -p $OUTPUT_REPO_DIR | |
| echo $PAPER_NAME | |
| echo "------- Preprocess -------" | |
| python ../codes/0_pdf_process.py \ | |
| --input_json_path ${PDF_JSON_PATH} \ | |
| --output_json_path ${PDF_JSON_CLEANED_PATH} \ | |
| echo "------- PaperCoder -------" | |
| python ../codes/1_planning_llm.py \ | |
| --paper_name $PAPER_NAME \ | |
| --model_name ${MODEL_NAME} \ | |
| --tp_size ${TP_SIZE} \ | |
| --pdf_json_path ${PDF_JSON_CLEANED_PATH} \ | |
| --output_dir ${OUTPUT_DIR} | |
| python ../codes/1.1_extract_config.py \ | |
| --paper_name $PAPER_NAME \ | |
| --output_dir ${OUTPUT_DIR} | |
| cp -rp ${OUTPUT_DIR}/planning_config.yaml ${OUTPUT_REPO_DIR}/config.yaml | |
| python ../codes/2_analyzing_llm.py \ | |
| --paper_name $PAPER_NAME \ | |
| --model_name ${MODEL_NAME} \ | |
| --tp_size ${TP_SIZE} \ | |
| --pdf_json_path ${PDF_JSON_CLEANED_PATH} \ | |
| --output_dir ${OUTPUT_DIR} | |
| python ../codes/3_coding_llm.py \ | |
| --paper_name $PAPER_NAME \ | |
| --model_name ${MODEL_NAME} \ | |
| --tp_size ${TP_SIZE} \ | |
| --pdf_json_path ${PDF_JSON_CLEANED_PATH} \ | |
| --output_dir ${OUTPUT_DIR} \ | |
| --output_repo_dir ${OUTPUT_REPO_DIR} \ | |