Skip to content

Instantly share code, notes, and snippets.

View tuxedocat's full-sized avatar
🐈‍⬛
WFH with cats

yu-s tuxedocat

🐈‍⬛
WFH with cats
View GitHub Profile
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 8, 2024 00:13
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vaaaaanquish
vaaaaanquish / PythonのPackage Managerを深く知るためのリンク集.md
Last active May 5, 2024 16:25
PythonのPackage Managerを深く知るためのリンク集

PythonのPackage Managerを深く知るためのリンク集

以下の発表(2023/10/12)につき作成した、Pythonのパッケージ管理について学ぶ上で有益なリンクを集めたもの。

Pythonでの開発に関するベストプラクティス等を知ることは目的にしていない。
Package Managerを自作したり、開発にコミットするために必要なベースの知識を補うリンク集。

Reinforcement Learning for Language Models

Yoav Goldberg, April 2023.

Why RL?

With the release of the ChatGPT model and followup large language models (LLMs), there was a lot of discussion of the importance of "RLHF training", that is, "reinforcement learning from human feedback". I was puzzled for a while as to why RL (Reinforcement Learning) is better than learning from demonstrations (a.k.a supervised learning) for training language models. Shouldn't learning from demonstrations (or, in language model terminology "instruction fine tuning", learning to immitate human written answers) be sufficient? I came up with a theoretical argument that was somewhat convincing. But I came to realize there is an additional argumment which not only supports the case of RL training, but also requires it, in particular for models like ChatGPT. This additional argument is spelled out in (the first half of) a talk by John Schulman from OpenAI. This post pretty much

@smnbbrv
smnbbrv / promisified-grpc-client.ts
Last active November 4, 2023 21:22
Promisify @grpc-js service client with typescript
import { Client, ServiceError, Metadata, CallOptions, ClientUnaryCall } from '@grpc/grpc-js';
import { Message } from 'google-protobuf';
type OriginalCall<T, U> = (request: T, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError, res: U) => void) => ClientUnaryCall;
type PromisifiedCall<T, U> = ((request: T, metadata?: Metadata, options?: Partial<CallOptions>) => Promise<U>);
export type Promisified<C> = { $: C; } & {
[prop in Exclude<keyof C, keyof Client>]: (C[prop] extends OriginalCall<infer T, infer U> ? PromisifiedCall<T, U> : never);
}
@tuxedocat
tuxedocat / Pok3r-macOS-_Karabiner-fn_.kbd.json
Last active June 28, 2020 04:24
Pok3r macOS (Karabiner fn)
[
{
"name": "Pok3r macOS (Karabiner fn)",
"author": "tuxedocat",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX3A-L1xx"
},
[
{
@c-bata
c-bata / lightgbm_rfe.py
Last active March 10, 2023 05:25
Recursive Feature Elimination for LightGBM. This class accepts missing values and Optuna LightGBM tuner.
import numpy as np
import pandas as pd
#import lightgbm as lgb
from optuna.integration import lightgbm as lgb
from sklearn.model_selection import train_test_split
from sklearn.utils import check_X_y, safe_sqr
from sklearn.feature_selection.base import SelectorMixin
from lightgbm import Booster
@danisla
danisla / README.md
Last active November 7, 2022 13:59
GKE GPU Sharing Daemonset

GPU Sharing on GKE DaemonSet

NOTE: This is not a Google supported product.

Example Usage

  1. Create a GKE cluster with a GPU node pool:
gcloud container clusters create gpu-sharing-demo --zone us-central1-c
@mpppk
mpppk / clean_architecture.md
Last active April 30, 2024 14:19
クリーンアーキテクチャ完全に理解した

2020/5/31追記: 自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。

このドキュメントを完成させるために、今後以下のような更新を予定しています。

  • TODO部分を埋める
  • 書籍を基にした理論・原則パートと、実装例パートを分割
    • 現在は4層のレイヤそれぞれごとに原則の確認→実装時の課題リスト→実装例という構成ですが、同じリポジトリへの言及箇所がバラバラになってしまう問題がありました。更新後は、実装時の課題リストを全て洗い出した後にまとめて実装を確認する構成とする予定です。

2021/1/22追記:

@sile
sile / README.md
Last active April 1, 2024 07:33
Optunaを使ってFFmpegのエンコードパラメータを最適化してみる

概要

  • Optunaというハイパーパラメータ最適化ツールを使って、FFmpegでの動画エンコードパラメータの最適化を試してみた結果のメモ
  • 具体的には、決められた制約(後述)下で、画質(SSIM)を最大化するようなパラメータ群を自動で見つけ出すのが目的
  • 結果としては、
    • 画質的には、FFmpegが提供しているプリセットの中で二番目に重いもの(slower)より若干良い程度のパラメータ群が見つかった
    • また、Optunaが見つけたパラメータ群の方がslowerに比べて、CPU負荷が小さかった

方針

@azu
azu / README.md
Last active March 15, 2024 09:59
スタートアップ/企業の調べ方