This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # train_grpo.py | |
| from typing import * | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset, load_from_disk | |
| from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer, TrlParser | |
| from dataclasses import dataclass, field | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset | 
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
- Download the latest zsh package: https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | npm set registry https://registry.npm.taobao.org && \ | |
| npm set disturl https://npm.taobao.org/dist && \ | |
| npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass && \ | |
| npm set electron_mirror https://npm.taobao.org/mirrors/electron/ && \ | |
| npm set puppeteer_download_host https://storage.googleapis.com.cnpmjs.org && \ | |
| npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver && \ | |
| npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver && \ | |
| npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs && \ | |
| npm set selenium_cdnurl https://npm.taobao.org/mirrors/selenium && \ | |
| npm set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector && \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.example.demoendpoint; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import org.springframework.boot.actuate.endpoint.annotation.Endpoint; | |
| import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | 
NewerOlder