Skip to content

Instantly share code, notes, and snippets.

View chenyaofo's full-sized avatar
😃
I may be slow to respond.

chenyaofo chenyaofo

😃
I may be slow to respond.
View GitHub Profile
@chenyaofo
chenyaofo / llmf-install.sh
Created March 10, 2025 11:02
Llama Factory Env Install Script
mamba create -n llmf python=3.10
conda activate llmf
pip config set global.index-url https://mirrors.bfsu.edu.cn/pypi/web/simple
pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cu124
pip install transformers==4.48.3
pip install datasets==3.2.0
pip install accelerate==1.2.1
pip install peft==0.12.0
pip install trl==0.9.6
unset LD_LIBRARY_PATH
@chenyaofo
chenyaofo / return_backtesting.py
Created October 16, 2025 00:44
Return backtesting for any trading pair on Binance.
# grid_backtest_step_both_unique_range_progress.py
# 在上一版基础上新增:
# 每天结束后打印执行进度:
# [arith_step10] finished 2025-10-14 cash=xxxxx pairs=xxx realized=xxx
# 并在日志文件 runs/.../progress.log 中同步写入。
import csv, os, io, zipfile, urllib.request
from datetime import datetime, timezone, timedelta
from torch.utils.tensorboard import SummaryWriter