->Written by Alpin<- ->Inspired by /hdg/'s LoRA train rentry<- !!!warning This guide is being slowly updated. We've already moved to the axolotl trainer.
[TOC2]
| 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 |
| package main | |
| import ( | |
| "archive/tar" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "os" | |
| "github.com/docker/docker/api/types" |
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "strings" | |
| "time" | |
| "github.com/aws/aws-sdk-go-v2/aws" | |
| "github.com/aws/aws-sdk-go-v2/config" |
->Written by Alpin<- ->Inspired by /hdg/'s LoRA train rentry<- !!!warning This guide is being slowly updated. We've already moved to the axolotl trainer.
[TOC2]
2020 - September
I wrote this document following my deeply believe that clarity and honesty can help build and strengthen relationships. So I aim to provide a clear understanding of how I can help you and how we can interact better.
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "time" | |
| ) | |
| func gracefulStop(ctx context.Context, graceDuration time.Duration, stop func() error) error { |
ffmpeg -i <input file> -hide_banner -y -c:a aac -ar 48000 -c:v h264 -profile:v baseline -crf 20 -sc_threshold 0 -pix_fmt yuv420p -hls_time 10 -strict -2 -vsync 2 -vf scale=w=XXX:h=XXX -b:v 800k -maxrate XXXk -bufsize 1200k -b:a 96k -hls_time 10 -f hls -hls_list_size 0 <output file>
Replace XXXs for scale settings to match your mediaplayer. Preferable to use an autoscaler on upper-medium settings first and let it process heavier resolutions in background. Maxrate of 1000k-1200k should work fine in most cases - keeping note that bufsize is set to 1200k.
Can get stuck every now and then. Use health monitor to pass the following checks and have Kubernetes restart container:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo echo "/swapfile swap swap defaults 0 0" >> /etc/fstab