Skip to content

Instantly share code, notes, and snippets.

View vinhnx's full-sized avatar
🍀
learn by doing

Vinh Nguyen vinhnx

🍀
learn by doing
View GitHub Profile
@vinhnx
vinhnx / falsehoods-programming-time-list.md
Created June 30, 2025 16:48 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@vinhnx
vinhnx / enhanced_personal_site.html
Last active March 25, 2025 03:55
Enhanced personal site, recreated by DeepSeek V3 0324. Enhanced by Sonnet 3.7 Thinking
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vinh Nguyen | iOS Engineer</title>
<!-- SEO & sharing meta tags -->
<meta name="description"
@vinhnx
vinhnx / grpo_demo.py
Created March 8, 2025 10:35 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
@vinhnx
vinhnx / ghostty.conf
Last active March 4, 2025 05:26
Ghostty config
# Ghostty Configuration File
# Reference: https://ghostty.org/docs/config/reference
# Theme and Appearance
custom-shader-animation = false
bold-is-bright = true
macos-icon = "chalkboard"
title = " "
macos-titlebar-proxy-icon = hidden
macos-window-shadow = false
@vinhnx
vinhnx / deepseek_config_explain.md
Last active December 26, 2024 05:17
deepseek-v3 config params

Configuration Explanation for DeepseekV3ForCausalLM

Config: https://huggingface.co/deepseek-ai/DeepSeek-V3-Base/blob/main/config.json

This configuration file defines the architecture and hyperparameters for a model named DeepseekV3ForCausalLM, which is a causal language model (LM) based on the DeepseekV3 architecture. Below is an explanation of the key configurations:


Model Architecture

  • architectures: Specifies the model class, which is DeepseekV3ForCausalLM. This indicates the model is designed for causal language modeling (e.g., text generation).
@vinhnx
vinhnx / README.md
Created November 21, 2024 13:50 — forked from Artefact2/README.md
GGUF quantizations overview
@vinhnx
vinhnx / ollama_dspy.py
Created April 14, 2024 02:06 — forked from jrknox1977/ollama_dspy.py
ollama+DSPy using OpenAI APIs.
# install DSPy: pip install dspy
import dspy
# Ollam is now compatible with OpenAI APIs
#
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call.
# If you do not include this you will get an error.
#
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete.
# At least with mistral.
@vinhnx
vinhnx / kitty.conf
Last active April 1, 2024 05:10
my Kitty Terminal config
# vim:fileencoding=utf-8:foldmethod=marker
# Include theme
include ./theme.conf
# ===== Config =====
font_family Menlo
font_size 15.0
@vinhnx
vinhnx / normcore-llm.md
Created March 28, 2024 05:03 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@vinhnx
vinhnx / UIViewController+ContainerExtensions.swift
Created January 23, 2024 10:51
UIViewController container
import UIKit
extension UIViewController {
func nxv_addChildViewController(_ childVC: UIViewController, containerView: UIView) {
addChild(childVC)
containerView.addSubview(childVC.view)
containerView.translatesAutoresizingMaskIntoConstraints = false
childVC.view.translatesAutoresizingMaskIntoConstraints = false