Tested on NVIDIA RTX 4090, but these instructions also cover AMD and Mac in case you wanna try those.
This guide assumes you are running Linux (I ran this on Ubuntu).
Before you get excited:
import torch | |
from transformers.models.roberta import RobertaConfig, RobertaModel, RobertaTokenizer | |
# load model and tokenizer | |
tokenizer = RobertaTokenizer.from_pretrained('FacebookAI/roberta-base') | |
model = RobertaModel.from_pretrained('FacebookAI/roberta-base', is_decoder=True).to('cuda') | |
# tokenize inputs | |
text = 'hello world, this is a test' | |
inputs = tokenizer(text, return_tensors='pt').to('cuda') |
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware | |
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware | |
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware | |
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware | |
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware | |
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware | |
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware |
from torch import FloatTensor, LongTensor, Tensor, Size, lerp, zeros_like | |
from torch.linalg import norm | |
# adapted to PyTorch from: | |
# https://gist.github.com/dvschultz/3af50c40df002da3b751efab1daddf2c | |
# most of the extra complexity is to support: | |
# - many-dimensional vectors | |
# - v0 or v1 with last dim all zeroes, or v0 ~colinear with v1 | |
# - falls back to lerp() | |
# - conditional logic implemented with parallelism rather than Python loops |
deb http://deb.debian.org/debian bullseye main contrib non-free | |
deb-src http://deb.debian.org/debian bullseye main contrib non-free | |
deb http://deb.debian.org/debian bullseye-updates main contrib non-free | |
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free | |
deb http://deb.debian.org/debian bullseye-backports main contrib non-free | |
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free | |
deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free |
I have a git repo which compiles into a dist folder and generates a bunch binaries (executables).
The binaries and dist
folders are .gitignore
-ed and hence, are not included in the repo.
But I want to distribute a source
+ binaries
snapshot zipfile.
I want them to contain:
a) all the sources
b) all the binaries
c) the dist folder (so that they can tweak it)
d) not the .git/
directory, not the hidden files like .cache
or node_modules/
etc.
/* | |
* John Conway's Game of Life. | |
* | |
* This is written for POSIX, using Curses. Resizing of the terminal is not | |
* supported. | |
* | |
* By convention in this program, x is the horizontal coordinate and y is | |
* vertical. There correspond to the width and height respectively. | |
* The current generation number is illustrated when show_generation is set. | |
* |
deb http://deb.debian.org/debian buster main contrib non-free | |
deb-src http://deb.debian.org/debian buster main contrib non-free | |
deb http://deb.debian.org/debian buster-updates main contrib non-free | |
deb-src http://deb.debian.org/debian buster-updates main contrib non-free | |
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free | |
deb-src http://security.debian.org/debian-security/ buster/updates main contrib non-free |
diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc | |
index 561276f0c2..1af0935e1f 100644 | |
--- a/src/core/lib/gpr/log_linux.cc | |
+++ b/src/core/lib/gpr/log_linux.cc | |
@@ -40,7 +40,7 @@ | |
#include <time.h> | |
#include <unistd.h> | |
-static long gettid(void) { return syscall(__NR_gettid); } | |
+static long sys_gettid(void) { return syscall(__NR_sys_gettid); } |
#!/bin/bash | |
# First sudo command | |
sudo whoami | |
# Update and upgrade | |
sudo apt update | |
sudo apt upgrade -y | |
# Utility |