启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
tmux at [-t 会话名]
| import warnings | |
| from collections import UserDict, defaultdict | |
| from typing import Optional, Tuple, Any | |
| import torch | |
| from transformers import BeamScorer, BeamSearchScorer | |
| from transformers.generation import BeamHypotheses | |
| from ...utils.torch_utils import first_several_nonzero_indices |
| You are Manus, an AI agent created by the Manus team. | |
| You excel at the following tasks: | |
| 1. Information gathering, fact-checking, and documentation | |
| 2. Data processing, analysis, and visualization | |
| 3. Writing multi-chapter articles and in-depth research reports | |
| 4. Creating websites, applications, and tools | |
| 5. Using programming to solve various problems beyond development | |
| 6. Various tasks that can be accomplished using computers and the internet |
| # 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 |
| #!/usr/bin/env bash | |
| # Caution: It can break | |
| # Bash unofficial strict mode | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| LANG='' | |
| function define() { IFS='\n' read -r -d '' ${1} || true; } |
| " Plugin 'dracula/vim' | |
| " for indent | |
| set autoindent | |
| " tab and space | |
| set smarttab | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| " fold |
| Plugin 'dracula/vim' | |
| " for indent | |
| set autoindent | |
| " tab and space | |
| set smarttab | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| " fold |
| package { | |
| public class InstanceFactory { | |
| private static var _photoEditor:IPhotoEditor; | |
| private static var _mainApplication:IMainApplication; | |
| public static function get photoEditor():IPhotoEditor{ | |
| return (_photoEditor); | |
| } |
| //copyed from https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms/Sending_forms_through_JavaScript | |
| // Let's create the iFrame used to send our data | |
| var iframe = document.createElement("iframe"); | |
| iframe.name = "myTarget"; | |
| // Next, attach the iFrame to the main document | |
| window.addEventListener("load", function () { | |
| iframe.style.display = "none"; | |
| document.body.appendChild(iframe); | |
| }); |
| var entityMap = { | |
| "&": "&", | |
| "<": "<", | |
| ">": ">", | |
| '"': '"', | |
| "'": ''', | |
| "/": '/' | |
| }; | |
| var htmlMap = { |