Skip to content

Instantly share code, notes, and snippets.

View GuuD's full-sized avatar

Illia Dulskyi GuuD

  • Kyiv, Ukraine
  • 16:41 (UTC +02:00)
View GitHub Profile
@GuuD
GuuD / README.md
Created May 30, 2024 07:43 — forked from Artefact2/README.md
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggml-org/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@GuuD
GuuD / StubBuilderCE.fs
Created January 16, 2023 16:12 — forked from TheAngryByrd/StubBuilderCE.fs
Computation Expression Stub for F#
open System
// Replace with your type
type MyType<'a> = Async<'a>
type Internal<'a> = MyType<'a>
// Replace with types that feel similar and can be converted to `MyType`
type External1<'a> = System.Threading.Tasks.Task<'a>
type External2<'a> = System.Threading.Tasks.ValueTask<'a>
@GuuD
GuuD / GiraffeAsyncComposer.fs
Created January 16, 2023 16:11 — forked from TheAngryByrd/GiraffeAsyncComposer.fs
F# Giraffe Compose Async SRTP
open System
open Giraffe
open Microsoft.AspNetCore.Http
open System.Threading
open System.Threading.Tasks
module HttpHandlerHelpers=
/// Converts an Async HttpHandler to a normal Giraffe Task based HttpHandler
let inline convertAsyncToTask (asyncHandler : HttpFunc -> HttpContext -> Async<HttpContext option>) (next : HttpFunc) (ctx : HttpContext) : HttpFuncResult =
// step0: quick intro about paket, fake, |> operator and unit
// ------------------ begin ----------------
(*
The problem: lots of boilerplate code to make sure the exit code is being handled properly in our build script.
when we have more steps, the code will smell worse.
*)
// step0: quick intro about paket, fake, |> operator and unit
// ------------------ begin ----------------
(*
The problem: lots of boilerplate code to make sure the exit code is being handled properly in our build script.
when we have more steps, the code will smell worse.
*)
// extend a type from another assembly with 'combine'
type List<'a> with
static member combine (f, x: List<'a>) : List<'a> = x @ [f]
// extend another type from another assembly with 'combine'
type System.Int32 with
static member combine (f, x: System.Int32) = x + f
// extend a type from this assembly with 'combine'