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, os, sys, glob | |
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
from model import ExLlama, ExLlamaCache, ExLlamaConfig | |
from lora import ExLlamaLora | |
from tokenizer import ExLlamaTokenizer | |
from generator import ExLlamaGenerator | |
from initialize import initialize_session, intitialize_model | |
from token_processor import KillSequenceProcessor | |
class ChatSession: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
from pipe import StableDiffusionXLPipelineNoWatermark | |
from pipei2i import StableDiffusionXLImg2ImgPipelineNoWatermark | |
from diffusers import DiffusionPipeline | |
from PIL import Image | |
import os | |
import gc | |
import pandas as pd | |
import random, sys |
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 json | |
import argparse | |
import os | |
import re | |
from transformers import AutoTokenizer | |
from langchain.text_splitter import RecursiveCharacterTextSplitter | |
def l(tokenizer, txt): | |
return len(tokenizer.encode(txt)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 cuda_ext | |
from model import ExLlama, ExLlamaCache | |
from lora import ExLlamaLora | |
import torch | |
import torch.nn.functional as F | |
from healing import * | |
class ExLlamaGenerator: | |
class Settings: |
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 json | |
import re | |
import string | |
import sys | |
def clean_text(text): | |
# Strip leading and trailing white space | |
text = text.strip() | |
# Replace consecutive white space characters with a single space |