Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| import torch | |
| import peft | |
| import json | |
| import shutil | |
| from peft.utils import _get_submodules | |
| import os | |
| import bitsandbytes as bnb | |
| from bitsandbytes.functional import dequantize_4bit | |
| from peft import PeftModel | |
| from transformers import AutoModelForCausalLM, LlamaForCausalLM, LlamaTokenizer, BitsAndBytesConfig, CodeLlamaTokenizer |
This file contains hidden or 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
| # this needs to be on the *remote* machine. | |
| if [ ! -z "$SSH_CLIENT" ] | |
| then | |
| function code() { | |
| local ssh_client_host=$(echo $SSH_CLIENT | cut -d ' ' -f1) | |
| if [ -z "$1" ] | |
| then | |
| local argpath="." |
This file contains hidden or 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
| version: '2.1' | |
| services: | |
| php: | |
| tty: true | |
| build: | |
| context: . | |
| dockerfile: tests/Docker/Dockerfile-PHP | |
| args: | |
| version: cli | |
| volumes: |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # You need PIL <http://www.pythonware.com/products/pil/> to run this script | |
| # Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use | |
| # any TTF you have) | |
| # Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com] | |
| # License: GPL <http://www.gnu.org/copyleft/gpl.html> | |
| from image_utils import ImageText |