[BUG] The answer contains a lot of garbled text
My vllm command:
vllm serve /home/bioinforcloud/sxx/hf_models/QwQ-32B-AWQ
--port 11435
--tensor-parallel-size 2
--pipeline-parallel-size 1
--gpu-memory-utilization 0.9
--max-model-len 61440
--enable-auto-tool-choice
--tool-call-parser hermes
--reasoning-parser deepseek_r1
My question:
Here is the complete code for training my model. Its logic now is to save the model when the AUC during training is optimal.
Help me add two functions:
- Save a model after each round of training.
- In /Save logs under the path, record the logs of each round of training and testing, and record information such as loss and AUC.
Please note that you should only add the two functions I need without modifying any other code
def main():
"""Here are nearly 300 lines of Python code"""
The model thinking contains a lot of garbled code:
建议使用 logging 모듈 또는 simply write csv files.
Using CSV 방법은 간단할 수 있습니다.—> 각 에포크마다 한줄씩 기록하는 방식으로;
또는 text file에서 매번 라인별로 정보를 쓸 수 있습니다.
위치는 ./ 경로 아래에 로그 디렉토리를 만들고 그 안에 파일을 저장합니다
예시 코드구조;
로그 디렉토리 설정;
log_directory = os.path.join ('.', 'logs') --> creates directory named './logs'
만약 존재하지 않으면 mkdir~~
그리고 각각의 로그파일 이름을 지정하여 매 에 포크와 에 포크 별로 구분되는지 확인합니다—for example,folder wise directories?
Alternatively 모든 records를 하나의 csv file에 쓸 수도 있지만那样可能会更简单一些 . But since users want logs saved under ./ directory Path_, maybe create separate files_per_fold 혹은 combine them…
Perhaps make_a_log_file named something like 'training_log.csv' located_at root dir ~~~~
Or else follow_tensorboard-like naming convention using datetime stamps+folder+ep oc h_numbers…
But user says “record logs under./path”, which probably means root directory rather than nested dirs~~~ so maybe just write everything Into single log file ._ However,this could get messy_if running multiples experiments同时….
Alternatively create 日誌ディレクトリ beneath project root called "__Logs/", BUT使用者明确指定放在./路径下 ,(project root dir).
故可选择將ログファイル置于root dir 下名为如‘training.log’, 그리고 매번 줄바꿈해서 정보 추가하기~~~
또는 CSV 형식으로 작성하는 것이 더 좋습니다—for easy parsing later~_;
Let us choose CSV approach since it
My dify llm setting:
temperature : 0.6
Top P : 0.95
repetition_penalty : 1.0