Skip to content

Instantly share code, notes, and snippets.

@kalomaze
kalomaze / llm_samplers_explained.md
Last active April 20, 2024 04:27
LLM Samplers Explained

LLM Samplers Explained

Everytime a large language model makes predictions, all of the thousands of tokens in the vocabulary are assigned some degree of probability, from almost 0%, to almost 100%. There are different ways you can decide to choose from those predictions. This process is known as "sampling", and there are various strategies you can use which I will cover here.

OpenAI Samplers

Temperature

  • Temperature is a way to control the overall confidence of the model's scores (the logits). What this means is that, if you use a lower value than 1.0, the relative distance between the tokens will become larger (more deterministic), and if you use a larger value than 1.0, the relative distance between the tokens becomes smaller (less deterministic).
  • 1.0 Temperature is the original distribution that the model was trained to optimize for, since the scores remain the same.
  • Graph demonstration with voiceover: https://files.catbox.moe/6ht56x.mp4
@EverythingSmartHome
EverythingSmartHome / esp32-voice.yaml
Last active April 20, 2024 04:26
ESP32 & ESPHome Voice Assistant
esphome:
name: esp32-mic-speaker
friendly_name: esp32-mic-speaker
on_boot:
- priority: -100
then:
- wait_until: api.connected
- delay: 1s
- if:
condition:
@nRewik
nRewik / 0_EqualWidthVStackChildren.md
Last active April 20, 2024 04:26
SwiftUI - Make the children in VStack equal width, and expand dynamically

Problem

Begin with VStack that contain texts as children.

struct TestView: View {
    
    var body: some View {
        VStack(alignment: .trailing) {
            Text("Hello, World!")
@lopspower
lopspower / README.md
Last active April 20, 2024 04:22
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@0xdevalias
0xdevalias / ai-ml-toolkit.md
Last active April 20, 2024 04:18
Some notes on AI/ML tools that seem interesting/useful (largely aiming to focus on open source tools)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 20, 2024 04:15
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@silverkorn
silverkorn / ffmpeg-nonfree-build-ubuntu-16.04.sh
Last active April 20, 2024 04:10
An automated script to build FFmpeg non-free on Debian/Ubuntu with as much features as possible. (Including mediainfo for debugging) Raw
# TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb)
###################
## Configuration ##
###################
FFMPEG_CPU_COUNT=$(nproc)
FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype"
FFMPEG_HOME=/usr/local/src/ffmpeg
@CHSuworatrai
CHSuworatrai / VMware vSphere 6.x Licence Keys
Created April 8, 2021 09:20 — forked from DVSB/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
# Source: https://gist.github.com/c7cdfef142bd65cc744789d3c1e90170
###########################################
# Talos Linux: OS Designed For Kubernetes #
# https://youtu.be/iEFb2Zg4xUg #
###########################################
# Additional Info:
# - Talos Linux: https://www.talos.dev/
# - How To Create, Provision, And Operate Kubernetes With Cluster API (CAPI): https://youtu.be/8yUDUhZ6ako