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
"""An implementation of the Intersection over Union (IoU) metric for Keras.""" | |
from keras import backend as K | |
def iou(y_true, y_pred, label: int): | |
""" | |
Return the Intersection over Union (IoU) for a given label. | |
Args: | |
y_true: the expected y values as a one-hot |
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
""" Implementation of OKapi BM25 with sklearn's TfidfVectorizer | |
Distributed as CC-0 (https://creativecommons.org/publicdomain/zero/1.0/) | |
""" | |
import numpy as np | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from scipy import sparse | |
class BM25(object): |
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
# Machine Intelligence Made to Impersonate Characteristics: MIMIC | |
# NOTE run this $ conda install -c conda-forge mpi4py mpich to get mpi working | |
# accelerate launch --use_deepspeed -m axolotl.cli.train ./config_name_here | |
base_model: alpindale/Mistral-7B-v0.2-hf | |
base_model_config: alpindale/Mistral-7B-v0.2-hf | |
model_type: MistralForCausalLM | |
tokenizer_type: LlamaTokenizer | |
is_mistral_derived_model: true |
OlderNewer