Skip to content

Instantly share code, notes, and snippets.

@Artefact2
Artefact2 / README.md
Last active May 5, 2024 06:06
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: ggerganov/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

@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 06:04
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bonadio
bonadio / autogen_chat.py
Last active May 5, 2024 06:02
Very basic implementation of Autogen with FastApi using websocket to interact with user_proxy in a web app
import autogen
from user_proxy_webagent import UserProxyWebAgent
import asyncio
config_list = [
{
"model": "gpt-3.5-turbo",
# "api_key": "<YOUR KEY HERE>"
}
]
@rxaviers
rxaviers / gist:7360908
Last active May 5, 2024 06:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@Sohamsk
Sohamsk / graph_colouring_backtracking.py
Last active May 5, 2024 06:00
Solving backtracking problem
def is_safe(graph, colours, colour, current):
neighbours = graph[current]
for neighbour in neighbours:
if colour == colours[neighbour - 1]:
return False
return True
def graph_traversal(graph, colours, vertices, current):
if current == vertices + 1:
return True
@Sohamsk
Sohamsk / djikstra.py
Last active May 5, 2024 06:00
This gist is meant to store code related to greedy algorithms
import heapq
from typing import List
def djikstra(graph_inner, starting, vertices) -> List:
pq = []
dist = [float('inf') for i in range(vertices)]
dist[starting] = 0
print(dist)
heapq.heappush(pq, [0, starting])
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sohamsk
Sohamsk / Astar.py
Last active May 5, 2024 06:00
Solving 8 puzzle problem using A star algorithm.
class Node:
def __init__(self, data: list, level, f_val):
self.data = data
self.level = level
self.f_val = f_val
def generate_children(self):
children = []
values = [[0, 1], [1, 0], [-1, 0], [0, -1]]
row, col = self.find()
@anvaka
anvaka / 00.Intro.md
Last active May 5, 2024 06:00
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@avataru
avataru / EloquentCheatSheet.md
Last active May 5, 2024 05:59
Eloquent relationships cheat sheet