Skip to content

Instantly share code, notes, and snippets.

View husmen's full-sized avatar

Houssem MENHOUR husmen

View GitHub Profile
@rain-1
rain-1 / llama-home.md
Last active May 7, 2024 21:04
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@Bouni
Bouni / LinuxCNC-Ethercat.md
Last active April 21, 2024 02:09
Linux CNC + EtherCat + RPi 4 Setup

The folowing is a writup from Hakans forum post!

RPi Setup

  1. Download & Write image to SD card: www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
  2. Configure Wifi via wpa_supplicant.conf
  3. Put SD card into RPi and verify that RT-PREEMT Kernel is running: uname -a
  4. Update everything and reboot: sudo apt update && sudo apt upgrade && sudo reboot
@akostadinov
akostadinov / xmr-stak.service
Last active May 14, 2021 07:35
Example xmr-stak systemd service unit file.
[Unit]
Description=xmr-stak miner
After=syslog.target network.target
[Service]
Type=simple
# interesting info about starting as regular user: https://bbs.archlinux.org/viewtopic.php?id=162297
User=username
LimitMEMLOCK=256M
EnvironmentFile=-/etc/sysconfig/xmr-stak
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
@candlewill
candlewill / keras_models.md
Last active December 9, 2022 02:43
A collection of Various Keras Models Examples

Keras Models Examples

一系列常用模型的Keras实现

DNN

Multilayer Perceptron (MLP) for multi-class softmax classification

from keras.models import Sequential
@dasmithii
dasmithii / _SpringerMATH
Last active September 13, 2022 10:23
A list of a bunch of math textbooks recently made free by Springer, plus some code to batch download them all. Put all these files in in a directory. Run downloader.go. Then you'll have ###.pdf's all over the place. Run mut.py to generate an index of PDF's. Then move 'em wherever you'd like. Sorry for ugliness....
...
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@oldo
oldo / video-metada-finder.py
Last active March 2, 2023 22:33
A python function utilising `ffprobe` to find any metadata related to a video file. Examples of what it can find include bitrate, fps, codec details, duration and many more. This gist returns the video height and width as an example.
#!/usr/local/bin/python3
import subprocess
import shlex
import json
# function to find the resolution of the input video file
def findVideoMetada(pathToInputVideo):
cmd = "ffprobe -v quiet -print_format json -show_streams"
args = shlex.split(cmd)
args.append(pathToInputVideo)