This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A minimal, fast example generating text with Llama 3.1 in MLX. | |
To run, install the requirements: | |
pip install -U mlx transformers fire | |
Then generate text with: | |
python l3min.py "How tall is K2?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record/connection_adapters/sqlite3_adapter' | |
# | |
# Monkey-patch for disable foreign keys during `alter_table` for sqlite3 adapter for Rails 5 | |
# | |
module ActiveRecord | |
module ConnectionAdapters | |
class SQLite3Adapter < AbstractAdapter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SCRIPTNAME=$(basename "$0") | |
function realpath () { | |
f=$@; | |
if [ -d "$f" ]; then | |
base=""; | |
dir="$f"; | |
else | |
base="/$(basename "$f")"; |
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
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# LibreOffice headless server script | |
# | |
# chkconfig: 2345 80 30 | |
# description: headless openoffice server script | |
# processname: libreoffice | |
# | |
# Author: Vic Vijayakumar | |
# Modified by Federico Ch. Tomasczik | |
# and then by Mark Pavlichuk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule gen_injected_template_Word | |
{ | |
meta: | |
description = "Detects injected templates in DOCX" | |
author = "John Lambert @JohnLaTwC" | |
date = "2020-05-03" | |
hash1 = "a3eca35d14b0e020444186a5faaba5997994a47af08580521f808b1bb83d6063" | |
hash2 = "a275dfa95393148bb9e0ddf5346f9fedcc9c87fa2ec3ce1ec875843664c37c89" | |
hash3 = "ed4835e5fd10bbd2be04c5ea9eb2b8e750aff2ef235de6e0f18d369469f69c83" | |
file_protocol_hash1 = "ac6c1df3895af63b864bb33bf30cb31059e247443ddb8f23517849362ec94f08 (settings.xml.rels)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"properties": { | |
"node": { | |
"properties": { | |
"id": { | |
"type": "string", | |
"description": "An opaque node identifier for the Envoy node. This also provides the local\n service node name. It should be set if any of the following features are\n used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS\n <config_cluster_manager_cds>`, and :ref:`HTTP tracing\n <arch_overview_tracing>`, either in this message or via\n :option:`--service-node`." | |
}, | |
"cluster": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Manually set the contents of an encrypted session cookie | |
# | |
# Uses the same encryption keys as the Rails app using devise | |
# | |
# Based off http://big-elephants.com/2014-01/handling-rails-4-sessions-with-go/ | |
# Verified against https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/cookies.rb | |
# | |
class TestSession |
NewerOlder