Skip to content

Instantly share code, notes, and snippets.

@KohakuBlueleaf
KohakuBlueleaf / grpo.py
Last active April 29, 2025 11:34
10% gsm-8k acc gain within 15min
## Note
## if use vllm in same gpu, remember to set a low gpu_memory_utilization to avoid OOM
## For larger model please consider to use multi-GPU or CPU offloading
## AnySchedule: https://github.com/KohakuBlueleaf/AnySchedule
## LyCORIS: https://github.com/KohakuBlueleaf/LyCORIS
## Following code can perform reasonable training on Llama-3.2-1B-Instruct model with GSM8K dataset
## With noticable improvement on each reward function
from itertools import chain
import re
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@anthonymq
anthonymq / step1.mo
Last active April 29, 2025 11:31
CanisterUpgrade
import TrieMap "mo:base/TrieMap";
import Iter "mo:base/Iter";
import Nat32 "mo:base/Nat32";
import Debug "mo:base/Debug";
shared ({caller = initPrincipal}) actor class Example () {
public type State = {
db: TrieMap.TrieMap<Nat32, Card>;
};
func empty () : State {
{
@raulchiclano
raulchiclano / README.md
Created September 23, 2022 11:24 — forked from matthewpi/README.md
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

@toy-crane
toy-crane / toss-frontend-rules.mdc
Last active April 29, 2025 11:26
토스 프론트엔드 가이드라인 기반으로 만든 Cursor rule
# Frontend Design Guideline
This document summarizes key frontend design principles and rules, showcasing
recommended patterns. Follow these guidelines when writing frontend code.
# Readability
Improving the clarity and ease of understanding code.
@Josef212
Josef212 / NesteScrollRect.cs
Last active April 29, 2025 11:24
A nested ScrollRect for unity
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class NestedScrollRect : ScrollRect
{
public override void OnInitializePotentialDrag(PointerEventData eventData)
{
for(int i = 0; i < m_parentInitializePotentialDragHandlers.Length; ++i)
{
@RankoR
RankoR / languages.json
Created April 3, 2025 23:20
Languages in ISO 639-1 Alpha-2 with names in English and the languages itself and Unicode flags
[
{
"code": "aa",
"name_en": "Afar",
"name": "Afaraf",
"flag": "🇪🇷"
},
{
"code": "ab",
"name_en": "Abkhazian",
@parmentf
parmentf / GitCommitEmoji.md
Last active April 29, 2025 11:20
Git Commit message Emoji
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active April 29, 2025 11:15
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default