modelId
stringlengths
5
122
author
stringlengths
2
42
last_modified
timestamp[us, tz=UTC]
downloads
int64
0
738M
likes
int64
0
11k
library_name
stringclasses
245 values
tags
listlengths
1
4.05k
pipeline_tag
stringclasses
48 values
createdAt
timestamp[us, tz=UTC]
card
stringlengths
1
901k
aneuraz/awesome-align-with-co
aneuraz
2022-04-29T16:16:12Z
643
3
transformers
[ "transformers", "pytorch", "bert", "fill-mask", "sentence alignment", "de", "fr", "en", "ro", "zh", "arxiv:2101.08231", "license:bsd-3-clause", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
2022-04-29T14:55:54Z
--- language: - de - fr - en - ro - zh thumbnail: tags: - sentence alignment license: bsd-3-clause --- # AWESOME: Aligning Word Embedding Spaces of Multilingual Encoders This model comes from the following GitHub repository: [https://github.com/neulab/awesome-align](https://github.com/neulab/awesome-align) It corresponds to this paper: [https://arxiv.org/abs/2101.08231](https://arxiv.org/abs/2101.08231) Please cite the original paper if you decide to use the model: ``` @inproceedings{dou2021word, title={Word Alignment by Fine-tuning Embeddings on Parallel Corpora}, author={Dou, Zi-Yi and Neubig, Graham}, booktitle={Conference of the European Chapter of the Association for Computational Linguistics (EACL)}, year={2021} } ``` `awesome-align` is a tool that can extract word alignments from multilingual BERT (mBERT) [Demo](https://colab.research.google.com/drive/1205ubqebM0OsZa1nRgbGJBtitgHqIVv6?usp=sharing) and allows you to fine-tune mBERT on parallel corpora for better alignment quality (see our paper for more details). ## Usage (copied from this [DEMO](https://colab.research.google.com/drive/1205ubqebM0OsZa1nRgbGJBtitgHqIVv6?usp=sharing) ) ```python from transformers import AutoModel, AutoTokenizer import itertools import torch # load model model = AutoModel.from_pretrained("aneuraz/awesome-align-with-co") tokenizer = AutoTokenizer.from_pretrained("aneuraz/awesome-align-with-co") # model parameters align_layer = 8 threshold = 1e-3 # define inputs src = 'awesome-align is awesome !' tgt = '牛对齐 是 牛 !' # pre-processing sent_src, sent_tgt = src.strip().split(), tgt.strip().split() token_src, token_tgt = [tokenizer.tokenize(word) for word in sent_src], [tokenizer.tokenize(word) for word in sent_tgt] wid_src, wid_tgt = [tokenizer.convert_tokens_to_ids(x) for x in token_src], [tokenizer.convert_tokens_to_ids(x) for x in token_tgt] ids_src, ids_tgt = tokenizer.prepare_for_model(list(itertools.chain(*wid_src)), return_tensors='pt', model_max_length=tokenizer.model_max_length, truncation=True)['input_ids'], tokenizer.prepare_for_model(list(itertools.chain(*wid_tgt)), return_tensors='pt', truncation=True, model_max_length=tokenizer.model_max_length)['input_ids'] sub2word_map_src = [] for i, word_list in enumerate(token_src): sub2word_map_src += [i for x in word_list] sub2word_map_tgt = [] for i, word_list in enumerate(token_tgt): sub2word_map_tgt += [i for x in word_list] # alignment align_layer = 8 threshold = 1e-3 model.eval() with torch.no_grad(): out_src = model(ids_src.unsqueeze(0), output_hidden_states=True)[2][align_layer][0, 1:-1] out_tgt = model(ids_tgt.unsqueeze(0), output_hidden_states=True)[2][align_layer][0, 1:-1] dot_prod = torch.matmul(out_src, out_tgt.transpose(-1, -2)) softmax_srctgt = torch.nn.Softmax(dim=-1)(dot_prod) softmax_tgtsrc = torch.nn.Softmax(dim=-2)(dot_prod) softmax_inter = (softmax_srctgt > threshold)*(softmax_tgtsrc > threshold) align_subwords = torch.nonzero(softmax_inter, as_tuple=False) align_words = set() for i, j in align_subwords: align_words.add( (sub2word_map_src[i], sub2word_map_tgt[j]) ) print(align_words) ```
Neurona/cpener-test
Neurona
2022-10-03T12:21:51Z
643
1
transformers
[ "transformers", "pytorch", "distilbert", "token-classification", "en", "license:unlicense", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
2022-09-22T22:44:08Z
--- license: unlicense language: "en" widget: - text: "FileZilla Project FileZilla Client 3.5.1." - text: "Google Chrome 56.0.2924.87." ---
coder119/Vectorartz_Diffusion
coder119
2023-03-03T14:08:26Z
643
115
diffusers
[ "diffusers", "text-to-image", "license:creativeml-openrail-m", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
2022-11-13T09:42:49Z
--- license: "creativeml-openrail-m" tags: - text-to-image --- Generate beautiful vector illustration Trigger word: **vectorartz** *(Sampler: DPM++ 2S a Karras, Steps: 16, CFG: 7)* beautiful landscape, vectorartz ![beautiful landscape, vectorartz](beautiful_landscape.png) instagram icon, vectorartz ![instagram icon, vectorartz](instagram_icon.png) isometric bazaar, vectorartz ![isometric bazaar, vectorartz](isometric_bazaar.png) isometric village, vectorartz ![isometric village, vectorartz](isometric_village.png) medieval armor, vectorartz ![medieval armor, vectorartz](medieval_armor.png) steampunk machinery, vectorartz ![steampunk machinery, vectorartz](steampunk_machinery.png) underwater coral reef, vectorartz ![underwater coral reef, vectorartz](underwater_coral_reef.png)
lorahub/flan_t5_large-quoref_Found_Context_Online
lorahub
2023-07-24T09:47:33Z
643
0
peft
[ "peft", "region:us" ]
null
2023-07-24T09:47:23Z
--- library_name: peft ---
mmnga/rinna-japanese-gpt-neox-3.6b-gguf
mmnga
2023-09-08T02:37:19Z
643
0
null
[ "gguf", "ja", "license:mit", "region:us" ]
null
2023-09-02T18:46:08Z
--- license: mit language: - ja --- # rinna/japanese-gpt-neox-3.6b [rinnaさんが公開しているjapanese-gpt-neox-3.6b](https://huggingface.co/rinna/japanese-gpt-neox-3.6b)のgguf変換版です。 他モデルはこちら [mmnga/rinna-bilingual-gpt-neox-4b-gguf](https://huggingface.co/mmnga/rinna-bilingual-gpt-neox-4b-gguf) [mmnga/rinna-bilingual-gpt-neox-4b-8k-gguf](https://huggingface.co/mmnga/rinna-bilingual-gpt-neox-4b-8k-gguf) [mmnga/rinna-bilingual-gpt-neox-4b-instruction-ppo-gguf](https://huggingface.co/mmnga/rinna-bilingual-gpt-neox-4b-instruction-ppo-gguf) [mmnga/rinna-japanese-gpt-neox-3.6b-gguf](https://huggingface.co/mmnga/rinna-japanese-gpt-neox-3.6b-gguf) [mmnga/rinna-japanese-gpt-neox-3.6b-instruction-ppo-gguf](https://huggingface.co/mmnga/rinna-japanese-gpt-neox-3.6b-instruction-ppo-gguf) *注意:こちらはブランチで試用になります。llama.cpp本家にgptneoxが実装された時に、このggufファイルが使用できない可能性があります。* ***[GitHubリポジトリの readme はこちら](https://github.com/mmnga/llama.cpp/tree/mmnga-dev)*** ## Usage (試用) ~~~~bash git clone --branch mmnga-dev https://github.com/mmnga/llama.cpp.git cd llama.cpp make -j ./main -m 'rinna-japanese-gpt-neox-3.6b-q4_0.gguf' -n 128 -p 'ユーザー: 吾輩って猫ですか? システム: ' --top_p 0.9 --temp 0.7 --repeat-penalty 1.1 ~~~~ **CUBLAS** ~~~~bash LLAMA_CUBLAS=1 make -j ./main -m 'rinna-japanese-gpt-neox-3.6b-q4_0.gguf' -n 128 -p 'ユーザー: 吾輩って猫ですか? システム: ' -ngl 32 ~~~~ **従来のCPU実行** ~~~~bash git clone --branch mmnga-dev https://github.com/mmnga/llama.cpp.git cd llama.cpp make -j gptneox ./gptneox -m 'rinna-japanese-gpt-neox-3.6b-q4_0.gguf' -n 128 -p 'ユーザー: 吾輩って猫ですか? システム: ' ~~~~
Legalaz/5F7aZHbsqJDGmWNV8FnLBP9LxGRTpbHd9Nd8u5qcXWguwEHv_vgg
Legalaz
2024-02-17T03:24:33Z
643
0
keras
[ "keras", "region:us" ]
null
2024-02-07T01:00:47Z
Entry not found
QuantFactory/Meta-Llama-Guard-2-8B-GGUF
QuantFactory
2024-04-19T01:54:29Z
643
10
null
[ "gguf", "facebook", "meta", "pytorch", "llama", "llama-3", "text-generation", "en", "arxiv:2312.06674", "arxiv:2403.13031", "base_model:meta-llama/Meta-Llama-Guard-2-8B", "license:other", "region:us" ]
text-generation
2024-04-18T19:44:41Z
--- language: - en pipeline_tag: text-generation tags: - facebook - meta - pytorch - llama - llama-3 license: other license_name: llama3 license_link: LICENSE base_model: meta-llama/Meta-Llama-Guard-2-8B --- # QuantFactory/Meta-Llama-Guard-2-8B-GGUF - This is the GGUF quantized version of [meta-llama/Meta-Llama-Guard-2-8B](https://huggingface.co/meta-llama/Meta-Llama-Guard-2-8B) created using llama.cpp - Llama3 use policy : [https://llama.meta.com/llama3/use-policy](https://llama.meta.com/llama3/use-policy) # Model Details Meta Llama Guard 2 is an 8B parameter Llama 3-based [1] LLM safeguard model. Similar to [Llama Guard](https://ai.meta.com/research/publications/llama-guard-llm-based-input-output-safeguard-for-human-ai-conversations/), it can be used for classifying content in both LLM inputs (prompt classification) and in LLM responses (response classification). It acts as an LLM – it generates text in its output that indicates whether a given prompt or response is safe or unsafe, and if unsafe, it also lists the content categories violated. Below is a response classification example input and output for Llama Guard 2. <p align="center"> <img src="https://github.com/facebookresearch/PurpleLlama/raw/main/Llama-Guard2/llamaguard_example.png" width="800"/> </p> In order to produce classifier scores, we look at the probability for the first token, and use that as the “unsafe” class probability. We can then apply score thresholding to make binary decisions. # Harm Taxonomy and Policy The model is trained to predict safety labels on the 11 categories shown below, based on the [MLCommons taxonomy](https://mlcommons.org/2024/04/mlc-aisafety-v0-5-poc/) of hazards. <table align="center"> <thead> <tr> <th colspan="2">Harm categories</th> </tr> </thead> <tbody> <tr> <td>S1: Violent Crimes</td> <td>S2: Non-Violent Crimes</td> </tr> <tr> <td>S3: Sex-Related Crimes</td> <td>S4: Child Sexual Exploitation</td> </tr> <tr> <td>S5: Specialized Advice</td> <td>S6: Privacy</td> </tr> <tr> <td>S7: Intellectual Property</td> <td>S8: Indiscriminate Weapons </td> </tr> <tr> <td>S9: Hate</td> <td>S10: Suicide &amp; Self-Harm</td> </tr> <tr> <td>S11: Sexual Content</td> <td></td> </tr> </tbody> </table> **S1: Violent Crimes** Responses that enable, encourage, or endorse the commission of violent crimes, including: (1) unlawful violence toward people (ex: terrorism, genocide, murder, hate-motivated violent crimes, child abuse, assault, battery, kidnapping) and (2) unlawful violence toward animals (ex: animal abuse) **S2: Non-Violent Crimes** Responses that enable, encourage, or endorse the commission of non-violent crimes, including: (1) personal crimes (ex: labor trafficking, threats, intimidation, hate-motivated non-violent crimes), (2) financial crimes (ex: fraud, scams, money laundering), (3) property crimes (ex: theft, arson, vandalism), (4) drug crimes (ex: creating or using regulated substances), (5) weapons crimes (ex: producing unlicensed firearms), and (6) cyber crimes (ex: hacking) **S3: Sex-Related Crimes** Responses that enable, encourage, or endorse the commission of sex-related crimes, including: (1) sex trafficking, (2) sexual assault (ex: rape), (3) sexual harassment (physical, verbal, or visual), and (4) prostitution **S4: Child Sexual Exploitation** Responses that contain, describe, enable, encourage, or endorse the sexual abuse of children **S5: Specialized Advice** Responses that contain specialized financial, medical, or legal advice, or that indicate dangerous activities or objects are safe **S6: Privacy** Responses that contain sensitive, nonpublic personal information that could undermine someone's physical, digital, or financial security **S7: Intellectual Property** Responses that may violate the intellectual property rights of any third party **S8: Indiscriminate Weapons** Responses that enable, encourage, or endorse the creation of indiscriminate weapons, including: (1) chemical weapons (ex: nerve gas), (2) biological weapons (ex: anthrax), (3) radiological weapons (ex: cobalt bombs), (4) nuclear weapons (ex: fission bombs), and (5) high-yield explosive weapons (ex: cluster munitions) **S9: Hate** Responses that demean or dehumanize people on the basis of their sensitive, personal characteristics (i.e., race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity, and/or serious disease) **S10: Suicide & Self-Harm** Responses that enable, encourage, or endorse acts of intentional self-harm, including: (1) suicide, (2) self-injury (ex: cutting), and (3) disordered eating **S11: Sexual Content** Responses that contain erotica ## How to Use in `transformers` ```py from transformers import AutoTokenizer, AutoModelForCausalLM import torch model_id = "meta-llama/Meta-Llama-Guard-2-8B" device = "cuda" dtype = torch.bfloat16 tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=dtype, device_map=device) def moderate(chat): input_ids = tokenizer.apply_chat_template(chat, return_tensors="pt").to(device) output = model.generate(input_ids=input_ids, max_new_tokens=100, pad_token_id=0) prompt_len = input_ids.shape[-1] return tokenizer.decode(output[0][prompt_len:], skip_special_tokens=True) moderate([ {"role": "user", "content": "I forgot how to kill a process in Linux, can you help?"}, {"role": "assistant", "content": "Sure! To kill a process in Linux, you can use the kill command followed by the process ID (PID) of the process you want to terminate."}, ]) # `safe` ``` # Training and Evaluation Data We start with the training set of Llama Guard (see [model card](https://github.com/meta-llama/PurpleLlama/blob/main/Llama-Guard/MODEL_CARD.md#training-data)), and obtain labels on the Harm Taxonomy described above. To improve adaptability of the model to different prompts, we train on hard samples, which are obtained by taking an existing sample and prompting Llama2 70B to produce an alternate policy description that will flip the label of the given sample. We report metrics for various models and APIs on our validation set, which is obtained from combining the validation set of Llama Guard v1 and held-out samples from the additional Llama 3 safety data. We compare performance on our internal test set, as well as on open datasets like [XSTest](https://github.com/paul-rottger/exaggerated-safety?tab=readme-ov-file#license), [OpenAI moderation](https://github.com/openai/moderation-api-release), and [BeaverTails](https://github.com/PKU-Alignment/beavertails). We find that there is overlap between our training set and the BeaverTails-30k test split. Since both our internal test set and BeaverTails use prompts from the Anthropic's [hh-rlhf dataset](https://github.com/anthropics/hh-rlhf) as a starting point for curating data, it is possible that different splits of Anthropic were used while creating the two datasets. Therefore to prevent leakage of signal between our train set and the BeaverTails-30k test set, we create our own BeaverTails-30k splits based on the Anthropic train-test splits used for creating our internal sets. *Note on evaluations*: As discussed in the Llama Guard [paper](https://arxiv.org/abs/2312.06674), comparing model performance is not straightforward as each model is built on its own policy and is expected to perform better on an evaluation dataset with a policy aligned to the model. This highlights the need for industry standards. By aligning Llama Guard 2 with the Proof of Concept MLCommons taxonomy, we hope to drive adoption of industry standards like this and facilitate collaboration and transparency in the LLM safety and content evaluation space. # Model Performance We evaluate the performance of Llama Guard 2 and compare it with Llama Guard and popular content moderation APIs such as Azure, OpenAI Moderation, and Perspective. We use the token probability of the first output token (i.e. safe/unsafe) as the score for classification. For obtaining a binary classification decision from the score, we use a threshold of 0.5. Llama Guard 2 improves over Llama Guard, and outperforms other approaches on our internal test set. Note that we manage to achieve great performance while keeping a low false positive rate as we know that over-moderation can impact user experience when building LLM-applications. <div align="center"> | **Model** | **F1 ↑** | **AUPRC ↑** | **False Positive<br>Rate ↓** | |--------------------------|:------:|:---------:|:-----------------------:| | Llama Guard\* | 0.665 | <ins>0.854</ins> | 0.027 | | Llama Guard 2 | **0.915** | **0.974** | 0.040 | | GPT4 | <ins>0.796</ins> | N/A | 0.151 | | OpenAI Moderation API | 0.347 | 0.669 | 0.030 | | Azure Content Safety API | 0.519 | N/A | 0.245 | | Perspective API | 0.265 | 0.586 | 0.046 | <small> Table 1: Comparison of performance of various approaches measured on our internal test set. <br><small><small> *The performance of Llama Guard is lower on our new test set due to expansion of the number of harm categories from 6 to 11, which is not aligned to what Llama Guard was trained on. </small></small></small> </div> <br> <div align="center"> | **Category** | **False Negative Rate\* ↓** | **False Positive Rate ↓** | |------------------------|:--------------------------:|:-------------------------:| | Violent Crimes | 0.042 | 0.002 | | Privacy | 0.057 | 0.004 | | Non-Violent Crimes | 0.082 | 0.009 | | Intellectual Property | 0.099 | 0.004 | | Hate | 0.190 | 0.005 | | Specialized Advice | 0.192 | 0.009 | | Sexual Content | 0.229 | 0.004 | | Indiscriminate Weapons | 0.263 | 0.001 | | Child Exploitation | 0.267 | 0.000 | | Sex Crimes | 0.275 | 0.002 | | Self-Harm | 0.277 | 0.002 | <small> Table 2: Category-wise breakdown of false negative rate and false positive rate for Llama Guard 2 on our internal benchmark for response classification with safety labels from the ML Commons taxonomy.<br><small><small>*The binary safe/unsafe label is used to compute categorical FNR by using the true categories. We do not penalize the model while computing FNR for cases where the model predicts the correct overall label but an incorrect categorical label.</small></small></small> </div> We also report performance on OSS safety datasets, though we note that the policy used for assigning safety labels is not aligned with the policy used while training Llama Guard 2. Still, Llama Guard 2 provides a superior tradeoff between f1 score and False Positive Rate on the XSTest and OpenAI Moderation datasets, demonstrating good adaptability to other policies. The BeaverTails dataset has a lower bar for a sample to be considered unsafe compared to Llama Guard 2's policy. The policy and training data of MDJudge [4] is more aligned with this dataset and we see that it performs better on them as expected (at the cost of a higher FPR). GPT-4 achieves high recall on all of the sets but at the cost of very high FPR (9-25%), which could hurt its ability to be used as a safeguard for practical applications. <table align="center"> <thead> <tr> <th></th> <th colspan="3">(F1 ↑ / False Positive Rate ↓)</th> </tr> </thead> <tbody> <tr> <td></td> <td><center>False Refusals<br>(XSTest)</center></td> <td><center>OpenAI policy<br>(OpenAI Mod)</center></td> <td><center>BeaverTails policy<br>(BeaverTails-30k)</center></td> </tr> <tr> <td>Llama Guard</td> <td>0.737 / 0.079</td> <td>0.737 / 0.079</td> <td>0.599 / 0.035</td> </tr> <tr> <td>Llama Guard 2</td> <td>0.884 / 0.084</td> <td>0.807 / 0.060</td> <td>0.736 / 0.059</td> </tr> <tr> <td>MDJudge</td> <td>0.856 / 0.172</td> <td>0.768 / 0.212</td> <td>0.849 / 0.098</td> </tr> <tr> <td>GPT4</td> <td>0.895 / 0.128</td> <td>0.842 / 0.092</td> <td>0.802 / 0.256</td> </tr> <tr> <td>OpenAI Mod API</td> <td>0.576 / 0.040</td> <td>0.788 / 0.156</td> <td>0.284 / 0.056</td> </tr> </tbody> </table> <div align="center"> <small>Table 3: Comparison of performance of various approaches measured on our internal test set for response classification. <br>NOTE: The policy used for training Llama Guard does not align with those used for labeling these datasets. Still, Llama Guard 2 provides a superior tradeoff between F1 score and False Positive Rate across these datasets, demonstrating strong adaptability to other policies.</small> </div> <br> We hope to provide developers with a high-performing moderation solution for most use cases by aligning Llama Guard 2 taxonomy with MLCommons standard. But as outlined in our Responsible Use Guide, each use case requires specific safety considerations and we encourage developers to tune Llama Guard 2 for their own use case to achieve better moderation for their custom policies. As an example of how Llama Guard 2's performance may change, we train on the BeaverTails training dataset and compare against MDJudge (which was trained on BeaverTails among others). <div align="center"> <br> | **Model** | **F1 ↑** | **False Positive Rate ↓** | |:---------------------------:|:--------:|:-------------------------:| | Llama Guard 2 | 0.736 | 0.059 | | MDJudge | <ins>0.849</ins> | 0.098 | | Llama Guard 2 + BeaverTails | **0.852** | 0.101 | <small>Table 4: Comparison of performance on BeaverTails-30k.</small> </div> # Limitations There are some limitations associated with Llama Guard 2. First, Llama Guard 2 itself is an LLM fine-tuned on Llama 3. Thus, its performance (e.g., judgments that need common sense knowledge, multilingual capability, and policy coverage) might be limited by its (pre-)training data. Second, Llama Guard 2 is finetuned for safety classification only (i.e. to generate "safe" or "unsafe"), and is not designed for chat use cases. However, since it is an LLM, it can still be prompted with any text to obtain a completion. Lastly, as an LLM, Llama Guard 2 may be susceptible to adversarial attacks or prompt injection attacks that could bypass or alter its intended use. However, with the help of external components (e.g., KNN, perplexity filter), recent work (e.g., [3]) demonstrates that Llama Guard is able to detect harmful content reliably. **Note on Llama Guard 2's policy** Llama Guard 2 supports 11 out of the 13 categories included in the [MLCommons AI Safety](https://mlcommons.org/working-groups/ai-safety/ai-safety/) taxonomy. The Election and Defamation categories are not addressed by Llama Guard 2 as moderating these harm categories requires access to up-to-date, factual information sources and the ability to determine the veracity of a particular output. To support the additional categories, we recommend using other solutions (e.g. Retrieval Augmented Generation) in tandem with Llama Guard 2 to evaluate information correctness. # Citation ``` @misc{metallamaguard2, author = {Llama Team}, title = {Meta Llama Guard 2}, howpublished = {\url{https://github.com/meta-llama/PurpleLlama/blob/main/Llama-Guard2/MODEL_CARD.md}}, year = {2024} } ``` # References [1] [Llama 3 Model Card](https://github.com/meta-llama/llama3/blob) [2] [Llama Guard Model Card](https://github.com/meta-llama/PurpleLlama/blob/main/Llama-Guard/MODEL_CARD.md) [3] [RigorLLM: Resilient Guardrails for Large Language Models against Undesired Content](https://arxiv.org/pdf/2403.13031.pdf) [4] [MDJudge for Salad-Bench](https://huggingface.co/OpenSafetyLab/MD-Judge-v0.1)
duyntnet/SOLAR-10.7B-Instruct-v1.0-imatrix-GGUF
duyntnet
2024-05-04T14:30:03Z
643
0
transformers
[ "transformers", "gguf", "imatrix", "SOLAR-10.7B-Instruct-v1.0", "text-generation", "en", "license:other", "region:us" ]
text-generation
2024-05-04T11:46:39Z
--- license: other language: - en pipeline_tag: text-generation inference: false tags: - transformers - gguf - imatrix - SOLAR-10.7B-Instruct-v1.0 --- Quantizations of https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0 # From original readme # **Usage Instructions** This model has been fine-tuned primarily for single-turn conversation, making it less suitable for multi-turn conversations such as chat. ### **Version** Make sure you have the correct version of the transformers library installed: ```sh pip install transformers==4.35.2 ``` ### **Loading the Model** Use the following Python code to load the model: ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("Upstage/SOLAR-10.7B-Instruct-v1.0") model = AutoModelForCausalLM.from_pretrained( "Upstage/SOLAR-10.7B-Instruct-v1.0", device_map="auto", torch_dtype=torch.float16, ) ``` ### **Conducting Single-Turn Conversation** ```python conversation = [ {'role': 'user', 'content': 'Hello?'} ] prompt = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True) inputs = tokenizer(prompt, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, use_cache=True, max_length=4096) output_text = tokenizer.decode(outputs[0]) print(output_text) ``` Below is an example of the output. ``` <s> ### User: Hello? ### Assistant: Hello, how can I assist you today? Please feel free to ask any questions or request help with a specific task.</s> ```
OwenArli/Awanllm-Llama-3-8B-Dolfin-v0.3
OwenArli
2024-05-07T13:24:21Z
643
0
transformers
[ "transformers", "safetensors", "llama", "text-generation", "conversational", "license:llama3", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-05-07T06:17:37Z
--- license: llama3 --- Based on Meta-Llama-3-8b-Instruct, and is governed by Meta Llama 3 License agreement: https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct This is a fine tune using an improved Dolphin and WizardLM dataset intended to make the model follow instructions better and refuse less. OpenLLM benchmark is running... Will soon have quants uploaded here on HF and have it up on our site https://awanllm.com for anyone to try. OpenLLM Benchmark: Training: - 2048 sequence length since the dataset has an average length of under 1000 tokens, while the base model is 8192 sequence length. From testing it still performs the same 8192 context just fine. - Training duration is around 1 days on 2xRTX 3090, using 4-bit loading and Qlora 64-rank 128-alpha resulting in ~2% trainable weights. Instruct format: ``` <|begin_of_text|><|start_header_id|>system<|end_header_id|> {{ system_prompt }}<|eot_id|><|start_header_id|>user<|end_header_id|> {{ user_message_1 }}<|eot_id|><|start_header_id|>assistant<|end_header_id|> {{ model_answer_1 }}<|eot_id|><|start_header_id|>user<|end_header_id|> {{ user_message_2 }}<|eot_id|><|start_header_id|>assistant<|end_header_id|> ``` Quants: FP16: https://huggingface.co/AwanLLM/Awanllm-Llama-3-8B-Dolfin-v0.3 GGUF: https://huggingface.co/AwanLLM/Awanllm-Llama-3-8B-Dolfin-v0.3-GGUF
Niggendar/chrismixpnyNSFW_v10
Niggendar
2024-05-21T21:46:08Z
643
2
diffusers
[ "diffusers", "safetensors", "arxiv:1910.09700", "endpoints_compatible", "diffusers:StableDiffusionXLPipeline", "region:us" ]
text-to-image
2024-05-21T21:37:40Z
--- library_name: diffusers --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🧨 diffusers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
cutycat2000x/InterDiffusion-3.8
cutycat2000x
2024-05-22T08:56:23Z
643
11
diffusers
[ "diffusers", "safetensors", "diffusion", "free", "freeai", "ai", "interdiffusion", "text-to-image", "license:mit", "endpoints_compatible", "diffusers:StableDiffusionXLPipeline", "region:us" ]
text-to-image
2024-05-22T08:18:35Z
--- license: mit library_name: diffusers pipeline_tag: text-to-image tags: - diffusion - free - freeai - ai - interdiffusion widget: - text: >- a smiling girl with sparkles in her eyes, walking in a garden, in the morning --style anime output: url: example1.png - text: >- firewatch landscape, Graphic Novel, Pastel Art, Poster, Golden Hour, Electric Colors, 4k, RGB, Geometric, Volumetric, Lumen Global Illumination, Ray Tracing Reflections, Twisted Rays, Glowing Edges, RTX --raw output: url: example2.png - text: >- Samsung Galaxy S9 output: url: example3.png - text: >- cat, 4k, 8k, hyperrealistic, realistic, High-resolution, unreal engine 5, rtx, 16k, taken on a sony camera, Cinematic, dramatic lighting output: url: example4.png - text: >- cinimatic closeup of burning skull output: url: example5.png - text: >- frozen elsa output: url: example6.png - text: >- A rainbow tree, anime style, tree in focus output: url: example7.png - text: >- A cat holding a sign that reads "Hello World" in cursive text output: url: example8.png - text: >- A birthday card for "Meow" output: url: example9.png --- - Size: 6.9 GB - Text: Partly - Base: InterDiffusion-3.5 - Recommended Size: 1024x1024 - Recommended Steps: 25 - Demo: [https://discord.gg/9vvZVjBHAN](https://discord.gg/9vvZVjBHAN) ## Examples: These examples use a custom made LoRA to mimic the Dall-E 3 style. Use different prompts for different results. To access the LoRA, you can use it here: [https://huggingface.co/cutycat2000x/LoRA](https://huggingface.co/cutycat2000x/LoRA) <Gallery />
mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF
mradermacher
2024-05-30T20:46:55Z
643
0
transformers
[ "transformers", "gguf", "mergekit", "merge", "en", "base_model:saishf/SOVL-Mega-Mash-V2-L3-8B", "license:cc-by-nc-4.0", "endpoints_compatible", "region:us" ]
null
2024-05-30T10:05:31Z
--- base_model: saishf/SOVL-Mega-Mash-V2-L3-8B language: - en library_name: transformers license: cc-by-nc-4.0 quantized_by: mradermacher tags: - mergekit - merge --- ## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: nicoboss --> weighted/imatrix quants of https://huggingface.co/saishf/SOVL-Mega-Mash-V2-L3-8B <!-- provided-files --> static quants are available at https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-GGUF ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ1_S.gguf) | i1-IQ1_S | 2.1 | for the desperate | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ1_M.gguf) | i1-IQ1_M | 2.3 | mostly desperate | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 2.5 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ2_XS.gguf) | i1-IQ2_XS | 2.7 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ2_S.gguf) | i1-IQ2_S | 2.9 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ2_M.gguf) | i1-IQ2_M | 3.0 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q2_K.gguf) | i1-Q2_K | 3.3 | IQ3_XXS probably better | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 3.4 | lower quality | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ3_XS.gguf) | i1-IQ3_XS | 3.6 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q3_K_S.gguf) | i1-Q3_K_S | 3.8 | IQ3_XS probably better | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ3_S.gguf) | i1-IQ3_S | 3.8 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ3_M.gguf) | i1-IQ3_M | 3.9 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q3_K_M.gguf) | i1-Q3_K_M | 4.1 | IQ3_S probably better | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q3_K_L.gguf) | i1-Q3_K_L | 4.4 | IQ3_M probably better | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-IQ4_XS.gguf) | i1-IQ4_XS | 4.5 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q4_0.gguf) | i1-Q4_0 | 4.8 | fast, low quality | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q4_K_S.gguf) | i1-Q4_K_S | 4.8 | optimal size/speed/quality | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q4_K_M.gguf) | i1-Q4_K_M | 5.0 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q5_K_S.gguf) | i1-Q5_K_S | 5.7 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q5_K_M.gguf) | i1-Q5_K_M | 5.8 | | | [GGUF](https://huggingface.co/mradermacher/SOVL-Mega-Mash-V2-L3-8B-i1-GGUF/resolve/main/SOVL-Mega-Mash-V2-L3-8B.i1-Q6_K.gguf) | i1-Q6_K | 6.7 | practically like static Q6_K | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. Additional thanks to [@nicoboss](https://huggingface.co/nicoboss) for giving me access to his hardware for calculating the imatrix for these quants. <!-- end -->
mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF
mradermacher
2024-06-08T16:32:46Z
643
1
transformers
[ "transformers", "gguf", "moe", "merge", "mergekit", "lazymergekit", "mlabonne/AlphaMonarch-7B", "OmnicromsBrain/Eros_Scribe-7b", "SanjiWatsuki/Kunoichi-DPO-v2-7B", "OmnicromsBrain/NeuralStar_Fusion-7B", "en", "base_model:OmnicromsBrain/NeuralStar_FusionWriter_4x7b", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
2024-06-08T06:40:53Z
--- base_model: OmnicromsBrain/NeuralStar_FusionWriter_4x7b language: - en library_name: transformers license: apache-2.0 quantized_by: mradermacher tags: - moe - merge - mergekit - lazymergekit - mlabonne/AlphaMonarch-7B - OmnicromsBrain/Eros_Scribe-7b - SanjiWatsuki/Kunoichi-DPO-v2-7B - OmnicromsBrain/NeuralStar_Fusion-7B --- ## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: nicoboss --> weighted/imatrix quants of https://huggingface.co/OmnicromsBrain/NeuralStar_FusionWriter_4x7b <!-- provided-files --> static quants are available at https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-GGUF ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ1_S.gguf) | i1-IQ1_S | 5.1 | for the desperate | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ1_M.gguf) | i1-IQ1_M | 5.6 | mostly desperate | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 6.5 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ2_XS.gguf) | i1-IQ2_XS | 7.2 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ2_S.gguf) | i1-IQ2_S | 7.4 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ2_M.gguf) | i1-IQ2_M | 8.1 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q2_K.gguf) | i1-Q2_K | 8.9 | IQ3_XXS probably better | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 9.4 | lower quality | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ3_XS.gguf) | i1-IQ3_XS | 10.0 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q3_K_S.gguf) | i1-Q3_K_S | 10.5 | IQ3_XS probably better | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ3_S.gguf) | i1-IQ3_S | 10.6 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ3_M.gguf) | i1-IQ3_M | 10.7 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q3_K_M.gguf) | i1-Q3_K_M | 11.7 | IQ3_S probably better | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q3_K_L.gguf) | i1-Q3_K_L | 12.6 | IQ3_M probably better | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-IQ4_XS.gguf) | i1-IQ4_XS | 13.0 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q4_0.gguf) | i1-Q4_0 | 13.8 | fast, low quality | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q4_K_S.gguf) | i1-Q4_K_S | 13.8 | optimal size/speed/quality | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q4_K_M.gguf) | i1-Q4_K_M | 14.7 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q5_K_S.gguf) | i1-Q5_K_S | 16.7 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q5_K_M.gguf) | i1-Q5_K_M | 17.2 | | | [GGUF](https://huggingface.co/mradermacher/NeuralStar_FusionWriter_4x7b-i1-GGUF/resolve/main/NeuralStar_FusionWriter_4x7b.i1-Q6_K.gguf) | i1-Q6_K | 19.9 | practically like static Q6_K | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. Additional thanks to [@nicoboss](https://huggingface.co/nicoboss) for giving me access to his hardware for calculating the imatrix for these quants. <!-- end -->
Synec801/mistral_7b_orca-Q8_0-GGUF
Synec801
2024-06-21T21:02:57Z
643
0
peft
[ "peft", "gguf", "medical", "llama-cpp", "gguf-my-repo", "text-generation", "en", "base_model:areegtarek/mistral_7b_orca", "license:apache-2.0", "region:us" ]
text-generation
2024-06-21T21:02:25Z
--- base_model: areegtarek/mistral_7b_orca language: - en library_name: peft license: apache-2.0 metrics: - bleu pipeline_tag: text-generation tags: - medical - llama-cpp - gguf-my-repo --- # Synec801/mistral_7b_orca-Q8_0-GGUF This model was converted to GGUF format from [`areegtarek/mistral_7b_orca`](https://huggingface.co/areegtarek/mistral_7b_orca) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/areegtarek/mistral_7b_orca) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo Synec801/mistral_7b_orca-Q8_0-GGUF --hf-file mistral_7b_orca-q8_0.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo Synec801/mistral_7b_orca-Q8_0-GGUF --hf-file mistral_7b_orca-q8_0.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo Synec801/mistral_7b_orca-Q8_0-GGUF --hf-file mistral_7b_orca-q8_0.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo Synec801/mistral_7b_orca-Q8_0-GGUF --hf-file mistral_7b_orca-q8_0.gguf -c 2048 ```
CHE-72/Yi-1.5-6B-Chat-Q4_0-GGUF
CHE-72
2024-06-22T07:34:13Z
643
0
null
[ "gguf", "llama-cpp", "gguf-my-repo", "base_model:01-ai/Yi-1.5-6B-Chat", "license:apache-2.0", "region:us" ]
null
2024-06-22T07:33:57Z
--- base_model: 01-ai/Yi-1.5-6B-Chat license: apache-2.0 tags: - llama-cpp - gguf-my-repo --- # CHE-72/Yi-1.5-6B-Chat-Q4_0-GGUF This model was converted to GGUF format from [`01-ai/Yi-1.5-6B-Chat`](https://huggingface.co/01-ai/Yi-1.5-6B-Chat) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/01-ai/Yi-1.5-6B-Chat) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo CHE-72/Yi-1.5-6B-Chat-Q4_0-GGUF --hf-file yi-1.5-6b-chat-q4_0.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo CHE-72/Yi-1.5-6B-Chat-Q4_0-GGUF --hf-file yi-1.5-6b-chat-q4_0.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo CHE-72/Yi-1.5-6B-Chat-Q4_0-GGUF --hf-file yi-1.5-6b-chat-q4_0.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo CHE-72/Yi-1.5-6B-Chat-Q4_0-GGUF --hf-file yi-1.5-6b-chat-q4_0.gguf -c 2048 ```
rdk94/Llama-3-Ko-8B-Instruct-Q8_0-GGUF
rdk94
2024-06-25T05:27:43Z
643
0
null
[ "gguf", "facebook", "meta", "pytorch", "llama", "llama-3", "llama-3-ko", "llama-cpp", "gguf-my-repo", "text-generation", "en", "ko", "base_model:maywell/Llama-3-Ko-8B-Instruct", "license:other", "region:us" ]
text-generation
2024-06-25T05:27:07Z
--- base_model: maywell/Llama-3-Ko-8B-Instruct language: - en - ko license: other license_name: llama3 license_link: LICENSE pipeline_tag: text-generation tags: - facebook - meta - pytorch - llama - llama-3 - llama-3-ko - llama-cpp - gguf-my-repo --- # rdk94/Llama-3-Ko-8B-Instruct-Q8_0-GGUF This model was converted to GGUF format from [`maywell/Llama-3-Ko-8B-Instruct`](https://huggingface.co/maywell/Llama-3-Ko-8B-Instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/maywell/Llama-3-Ko-8B-Instruct) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo rdk94/Llama-3-Ko-8B-Instruct-Q8_0-GGUF --hf-file llama-3-ko-8b-instruct-q8_0.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo rdk94/Llama-3-Ko-8B-Instruct-Q8_0-GGUF --hf-file llama-3-ko-8b-instruct-q8_0.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo rdk94/Llama-3-Ko-8B-Instruct-Q8_0-GGUF --hf-file llama-3-ko-8b-instruct-q8_0.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo rdk94/Llama-3-Ko-8B-Instruct-Q8_0-GGUF --hf-file llama-3-ko-8b-instruct-q8_0.gguf -c 2048 ```
Helsinki-NLP/opus-mt-en-tw
Helsinki-NLP
2023-08-16T11:31:33Z
642
1
transformers
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "en", "tw", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
translation
2022-03-02T23:29:04Z
--- tags: - translation license: apache-2.0 --- ### opus-mt-en-tw * source languages: en * target languages: tw * OPUS readme: [en-tw](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/en-tw/README.md) * dataset: opus * model: transformer-align * pre-processing: normalization + SentencePiece * download original weights: [opus-2020-01-08.zip](https://object.pouta.csc.fi/OPUS-MT-models/en-tw/opus-2020-01-08.zip) * test set translations: [opus-2020-01-08.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/en-tw/opus-2020-01-08.test.txt) * test set scores: [opus-2020-01-08.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/en-tw/opus-2020-01-08.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | JW300.en.tw | 38.2 | 0.577 |
timm/volo_d1_384.sail_in1k
timm
2024-02-10T23:44:26Z
642
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2106.13112", "license:apache-2.0", "region:us" ]
image-classification
2023-04-13T05:52:31Z
--- license: apache-2.0 library_name: timm tags: - image-classification - timm datasets: - imagenet-1k --- # Model card for volo_d1_384.sail_in1k A VOLO (Vision Outlooker) image classification model. Trained on ImageNet-1k with token labelling by paper authors. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 26.8 - GMACs: 22.7 - Activations (M): 108.5 - Image size: 384 x 384 - **Papers:** - VOLO: Vision Outlooker for Visual Recognition: https://arxiv.org/abs/2106.13112 - **Dataset:** ImageNet-1k - **Original:** https://github.com/sail-sg/volo ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('volo_d1_384.sail_in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'volo_d1_384.sail_in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 577, 384) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Citation ```bibtex @article{yuan2022volo, title={Volo: Vision outlooker for visual recognition}, author={Yuan, Li and Hou, Qibin and Jiang, Zihang and Feng, Jiashi and Yan, Shuicheng}, journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, year={2022}, publisher={IEEE} } ```
Buseak/canine_deasciifier_0305
Buseak
2023-05-03T06:24:52Z
642
0
transformers
[ "transformers", "pytorch", "tensorboard", "canine", "token-classification", "generated_from_trainer", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
2023-05-03T05:48:53Z
--- license: apache-2.0 tags: - generated_from_trainer metrics: - precision - recall - f1 - accuracy model-index: - name: canine_deasciifier_0305 results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # canine_deasciifier_0305 This model is a fine-tuned version of [google/canine-s](https://huggingface.co/google/canine-s) on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.0007 - Precision: 0.9978 - Recall: 0.9983 - F1: 0.9981 - Accuracy: 0.9998 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 ### Training results | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:| | No log | 1.0 | 244 | 0.0672 | 0.7433 | 0.8204 | 0.7800 | 0.9735 | | No log | 2.0 | 488 | 0.0445 | 0.8205 | 0.8889 | 0.8533 | 0.9832 | | 0.1401 | 3.0 | 732 | 0.0256 | 0.8950 | 0.9259 | 0.9102 | 0.9906 | | 0.1401 | 4.0 | 976 | 0.0165 | 0.9384 | 0.9483 | 0.9433 | 0.9943 | | 0.0364 | 5.0 | 1220 | 0.0112 | 0.9597 | 0.9629 | 0.9613 | 0.9962 | | 0.0364 | 6.0 | 1464 | 0.0089 | 0.9656 | 0.9736 | 0.9696 | 0.9970 | | 0.021 | 7.0 | 1708 | 0.0073 | 0.9710 | 0.9797 | 0.9753 | 0.9976 | | 0.021 | 8.0 | 1952 | 0.0060 | 0.9740 | 0.9838 | 0.9789 | 0.9980 | | 0.0139 | 9.0 | 2196 | 0.0038 | 0.9856 | 0.9890 | 0.9873 | 0.9988 | | 0.0139 | 10.0 | 2440 | 0.0030 | 0.9893 | 0.9912 | 0.9903 | 0.9991 | | 0.01 | 11.0 | 2684 | 0.0024 | 0.9916 | 0.9932 | 0.9924 | 0.9993 | | 0.01 | 12.0 | 2928 | 0.0021 | 0.9919 | 0.9941 | 0.9930 | 0.9993 | | 0.0072 | 13.0 | 3172 | 0.0018 | 0.9938 | 0.9957 | 0.9947 | 0.9995 | | 0.0072 | 14.0 | 3416 | 0.0016 | 0.9940 | 0.9958 | 0.9949 | 0.9995 | | 0.0056 | 15.0 | 3660 | 0.0012 | 0.9955 | 0.9968 | 0.9962 | 0.9996 | | 0.0056 | 16.0 | 3904 | 0.0012 | 0.9954 | 0.9969 | 0.9962 | 0.9996 | | 0.0045 | 17.0 | 4148 | 0.0008 | 0.9975 | 0.9979 | 0.9977 | 0.9998 | | 0.0045 | 18.0 | 4392 | 0.0008 | 0.9975 | 0.9981 | 0.9978 | 0.9998 | | 0.0039 | 19.0 | 4636 | 0.0008 | 0.9974 | 0.9981 | 0.9977 | 0.9998 | | 0.0039 | 20.0 | 4880 | 0.0007 | 0.9978 | 0.9983 | 0.9981 | 0.9998 | ### Framework versions - Transformers 4.28.1 - Pytorch 2.0.0+cu118 - Datasets 2.12.0 - Tokenizers 0.13.3
TheBloke/MythoLogic-L2-13B-GGUF
TheBloke
2023-09-27T12:47:16Z
642
3
transformers
[ "transformers", "gguf", "llama", "en", "base_model:Gryphe/MythoLogic-L2-13b", "license:other", "text-generation-inference", "region:us" ]
null
2023-09-05T02:57:27Z
--- language: - en license: other model_name: Mythologic L2 13B base_model: Gryphe/MythoLogic-L2-13b inference: false model_creator: Gryphe model_type: llama prompt_template: 'Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ' quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Mythologic L2 13B - GGUF - Model creator: [Gryphe](https://huggingface.co/Gryphe) - Original model: [Mythologic L2 13B](https://huggingface.co/Gryphe/MythoLogic-L2-13b) <!-- description start --> ## Description This repo contains GGUF format model files for [Gryphe's Mythologic L2 13B](https://huggingface.co/Gryphe/MythoLogic-L2-13b). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. GGUF offers numerous advantages over GGML, such as better tokenisation, and support for special tokens. It is also supports metadata, and is designed to be extensible. Here is an incomplate list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. <!-- README_GGUF.md-about-gguf end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/MythoLogic-L2-13B-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF) * [Gryphe's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Gryphe/MythoLogic-L2-13b) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Alpaca ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` <!-- prompt-template end --> <!-- licensing start --> ## Licensing The creator of the source model has listed its license as `other`, and this quantization has therefore used that same license. As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly. In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Gryphe's Mythologic L2 13B](https://huggingface.co/Gryphe/MythoLogic-L2-13b). <!-- licensing end --> <!-- compatibility_gguf start --> ## Compatibility These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) They are also compatible with many third party UIs and libraries - please see the list at the top of this README. ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-provided-files start --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [mythologic-l2-13b.Q2_K.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes | | [mythologic-l2-13b.Q3_K_S.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss | | [mythologic-l2-13b.Q3_K_M.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss | | [mythologic-l2-13b.Q3_K_L.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss | | [mythologic-l2-13b.Q4_0.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M | | [mythologic-l2-13b.Q4_K_S.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| 9.91 GB | small, greater quality loss | | [mythologic-l2-13b.Q4_K_M.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended | | [mythologic-l2-13b.Q5_0.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M | | [mythologic-l2-13b.Q5_K_S.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended | | [mythologic-l2-13b.Q5_K_M.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended | | [mythologic-l2-13b.Q6_K.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss | | [mythologic-l2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGUF/blob/main/mythologic-l2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. <!-- README_GGUF.md-provided-files end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: - LM Studio - LoLLMS Web UI - Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: TheBloke/MythoLogic-L2-13B-GGUF and below it, a specific filename to download, such as: mythologic-l2-13b.q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub>=0.17.1 ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download TheBloke/MythoLogic-L2-13B-GGUF mythologic-l2-13b.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download TheBloke/MythoLogic-L2-13B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/MythoLogic-L2-13B-GGUF mythologic-l2-13b.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows CLI users: Use `set HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1` before running the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 32 -m mythologic-l2-13b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 4096` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. ### How to load this model from Python using ctransformers #### First install the package ```bash # Base ctransformers with no GPU acceleration pip install ctransformers>=0.2.24 # Or with CUDA GPU acceleration pip install ctransformers[cuda]>=0.2.24 # Or with ROCm GPU acceleration CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers # Or with Metal GPU acceleration for macOS systems CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers ``` #### Simple example code to load one of these GGUF models ```python from ctransformers import AutoModelForCausalLM # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = AutoModelForCausalLM.from_pretrained("TheBloke/MythoLogic-L2-13B-GGUF", model_file="mythologic-l2-13b.q4_K_M.gguf", model_type="llama", gpu_layers=50) print(llm("AI is going to")) ``` ## How to use with LangChain Here's guides on using llama-cpp-python or ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> <!-- original-model-card start --> # Original model card: Gryphe's Mythologic L2 13B The Llama 2 sequel to my [original experiment](https://huggingface.co/Gryphe/MythoLogic-13b) with gradient merges using [the following script](https://github.com/Gryphe/BlockMerge_Gradient). Its three models ([Hermes](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b), [Chronos](https://huggingface.co/elinas/chronos-13b-v2) and [Airoboros](https://huggingface.co/jondurbin/airoboros-l2-13b-gpt4-2.0)) are almost evenly divided over the layer structure this time. Airoboros was the "wildcard model" due to its superior ability to understand complex instructions. Quantized models are available from TheBloke: [GGML](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GGML) - [GPTQ](https://huggingface.co/TheBloke/MythoLogic-L2-13B-GPTQ) (You're the best!) ## Model details As before, the main objective was to create an all-round model with improved roleplaying capabilities. MythoLogic-L2 differs from its predecessor in that it focuses primarily on the understanding of instructions and personalities of complex character cards. Illustrated below are the gradients used for this specific L2 recipe, with the top of the image representing layer 0 and the bottom layer 40. ![](MythoLogic-L2.png) ## Prompt Format This model primarily uses (and was heavily tested with) Alpaca formatting, so for optimal model performance, use: ``` <System prompt/Character Card> ### Instruction: Your instruction or question here. For roleplay purposes, I suggest the following - Write <CHAR NAME>'s next reply in a chat between <YOUR NAME> and <CHAR NAME>. Write a single reply only. ### Response: ``` --- license: other --- <!-- original-model-card end -->
TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF
TheBloke
2023-09-27T12:48:29Z
642
4
transformers
[ "transformers", "gguf", "llama", "dataset:jondurbin/airoboros-2.1", "base_model:bhenrym14/airoboros-l2-13b-2.1-YaRN-64k", "license:llama2", "text-generation-inference", "region:us" ]
null
2023-09-08T08:21:58Z
--- license: llama2 datasets: - jondurbin/airoboros-2.1 model_name: Airoboros L2 13B 2.1 YaRN 64K base_model: bhenrym14/airoboros-l2-13b-2.1-YaRN-64k inference: false model_creator: bhenrym14 model_type: llama prompt_template: "A chat.\nUSER: {prompt}\nASSISTANT: \n" quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Airoboros L2 13B 2.1 YaRN 64K - GGUF - Model creator: [bhenrym14](https://huggingface.co/bhenrym14) - Original model: [Airoboros L2 13B 2.1 YaRN 64K](https://huggingface.co/bhenrym14/airoboros-l2-13b-2.1-YaRN-64k) <!-- description start --> ## Description This repo contains GGUF format model files for [bhenrym14's Airoboros L2 13B 2.1 YaRN 64K](https://huggingface.co/bhenrym14/airoboros-l2-13b-2.1-YaRN-64k). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. GGUF offers numerous advantages over GGML, such as better tokenisation, and support for special tokens. It is also supports metadata, and is designed to be extensible. Here is an incomplate list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. <!-- README_GGUF.md-about-gguf end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF) * [bhenrym14's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bhenrym14/airoboros-l2-13b-2.1-YaRN-64k) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Chat ``` A chat. USER: {prompt} ASSISTANT: ``` <!-- prompt-template end --> <!-- compatibility_gguf start --> ## Compatibility These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) They are also compatible with many third party UIs and libraries - please see the list at the top of this README. ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-provided-files start --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [airoboros-l2-13b-2.1-yarn-64k.Q2_K.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes | | [airoboros-l2-13b-2.1-yarn-64k.Q3_K_S.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss | | [airoboros-l2-13b-2.1-yarn-64k.Q3_K_M.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss | | [airoboros-l2-13b-2.1-yarn-64k.Q3_K_L.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss | | [airoboros-l2-13b-2.1-yarn-64k.Q4_0.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M | | [airoboros-l2-13b-2.1-yarn-64k.Q4_K_S.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| 9.91 GB | small, greater quality loss | | [airoboros-l2-13b-2.1-yarn-64k.Q4_K_M.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended | | [airoboros-l2-13b-2.1-yarn-64k.Q5_0.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M | | [airoboros-l2-13b-2.1-yarn-64k.Q5_K_S.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended | | [airoboros-l2-13b-2.1-yarn-64k.Q5_K_M.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended | | [airoboros-l2-13b-2.1-yarn-64k.Q6_K.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss | | [airoboros-l2-13b-2.1-yarn-64k.Q8_0.gguf](https://huggingface.co/TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF/blob/main/airoboros-l2-13b-2.1-yarn-64k.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. <!-- README_GGUF.md-provided-files end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: - LM Studio - LoLLMS Web UI - Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF and below it, a specific filename to download, such as: airoboros-l2-13b-2.1-yarn-64k.q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub>=0.17.1 ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF airoboros-l2-13b-2.1-yarn-64k.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF airoboros-l2-13b-2.1-yarn-64k.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows CLI users: Use `set HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1` before running the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 32 -m airoboros-l2-13b-2.1-yarn-64k.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "A chat.\nUSER: {prompt}\nASSISTANT:" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 4096` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. ### How to load this model from Python using ctransformers #### First install the package ```bash # Base ctransformers with no GPU acceleration pip install ctransformers>=0.2.24 # Or with CUDA GPU acceleration pip install ctransformers[cuda]>=0.2.24 # Or with ROCm GPU acceleration CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers # Or with Metal GPU acceleration for macOS systems CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers ``` #### Simple example code to load one of these GGUF models ```python from ctransformers import AutoModelForCausalLM # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = AutoModelForCausalLM.from_pretrained("TheBloke/Airoboros-L2-13B-2_1-YaRN-64K-GGUF", model_file="airoboros-l2-13b-2.1-yarn-64k.q4_K_M.gguf", model_type="llama", gpu_layers=50) print(llm("AI is going to")) ``` ## How to use with LangChain Here's guides on using llama-cpp-python or ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> <!-- original-model-card start --> # Original model card: bhenrym14's Airoboros L2 13B 2.1 YaRN 64K # Extended Context (via YaRN) Finetune of Llama-2-13b with airoboros-2.1 (fp16) [TheBloke](https://huggingface.co/TheBloke) has kindly quantized this model to [GGUF](https://huggingface.co/TheBloke/Airoboros-L2-13B-2.1-YaRN-64K-GGUF) and [GPTQ](https://huggingface.co/TheBloke/Airoboros-L2-13B-2.1-YaRN-64K-GPTQ). ## Overview This is a finetune of [NousResearch/Yarn-Llama-2-13b-64k](https://huggingface.co/NousResearch/Yarn-Llama-2-13b-64k), which is base Llama-2-13b with additional pretraining done with YaRN scaling applied to RoPE to extend the useful context length to 64k tokens. Starting with this model, I performed instruction tuning with [Jon Durbin's Airoboros 2.1 dataset](https://huggingface.co/datasets/jondurbin/airoboros-2.1), with the same scaling approach applied. **This is a (merged) QLoRA fine-tune (rank 64)**. The finetune was performed with 1x RTX 6000 Ada (~16 hours). ## How to Use YaRN is not implemented natively in `Transformers`. The YaRN pretrained model [NousResearch/Yarn-Llama-2-13b-64k](https://huggingface.co/NousResearch/Yarn-Llama-2-13b-64k) contains a drop-in llama architecture replacement that interfaces with the included configuration file. **To maximize compatibility, I have included the version that omits flash attention.** To run using `Transformers`, you will therefore need to pass `trust_remote_code=True`. The PNTK method employed in my other model [bhenrym14/airophin-13b-pntk-16k-fp16](https://huggingface.co/bhenrym14/airophin-13b-pntk-16k-fp16), is very similar to YaRN. For GPTQ, I have an exllama patch that I may adapt for YaRN, but the community appears motivated to rapidly implement YaRN in common libraries, so I may not bother. Please comment with any questions and feedback on how this model performs, especially at long context lengths! Ooba use: Be sure to increase the `Truncate the prompt up to this length` parameter to 65586 to utilize the full context capabilities. Again `trust_remote_code=True` is imperative. Obviously, using full context requires A LOT of VRAM. **There may be issues on Windows systems loading this model due to the decimal in "2.1" found in the model name. Try simply changing the model directory name to omit this decimal if you have issues loading the model.** ## Motivation [Yet another RoPE extensioN method (YaRN)](https://github.com/jquesnelle/yarn) is a novel method of extending the useful context of pretrained LLMs, with architectures employing RoPE, with minimal additonal training requirements. This method is the consequence of efforts to mitigate the shortcomings of other methods such as Position Interpolation (PI) and NTK-Aware scaling. This model is an attempt to enable the community to assess the capabilities of this extension method in real world applications. ## Relative Performance (wikitext perplexity) | Context (tokens) | <ins>**bhenrym14/airoboros-l2-13b-2.1-YaRN-64k**</ins> | bhenrym14/airoboros-l2-13b-PI-16k-fp16 | bhenrym14/airophin-v2-13b-PI-8k-fp16 | bhenrym14/airophin-13b-pntk-16k-fp16| bhenrym14/airoboros-13b-gpt4-1.4.1-PI-8192-fp16 |bhenrym14/airoboros-33b-gpt4-1.4.1-lxctx-PI-16384-fp16 | jondurbin/airoboros-l2-13b-gpt4-1.4.1 | | --- | --- |--- | ---| ----- | -----| ------| --- | | 512 | 7.64| 7.67 | 7.38 | 7.62 | 8.24 | 7.90 | **7.23** | | 1024 | 6.15 | 6.15 | 5.99 | 6.20 | 6.71 | 6.17 | **5.85** | | 2048 | 5.29 | 5.29 | 5.22 | 5.38 | 5.87 | 5.23 | **5.07** | | 4096 | 4.93 |4.94 | 4.90 | 5.08 | 5.50 | 4.91 | **4.77** | | 8192 | **4.69** |4.71 | 4.71 | 4.90 | 5.32 | Not Tested | 57.1 | | 12000 | **4.53** | 4.54 | 55 | 4.82 | 56.1 | Not Tested | Not Tested | - Despite having a far higher scaling factor, this model is competitive with bhenrym14/airophin-13b-pntk-16k-fp16 at short context lengths. - I may need to restrict these comparisons to models finetuned on the same dataset. Differences between airoboros 1.4.1 and 2.0m/2.1 may be a confounder. - Overall, it appears that YaRN is capable of extending the context window with minimal impact to short context performance, when compared to other methods. Furthermore, it's able to do this with a FAR higher scaling factor, which with other methods (especially PI), resulted in serious performance degradation at shorter context lengths. - Both the YaRN and Code LLama papers suggest that YaRN and NTK scaling may ameliorate the issue of "U shaped" attention to some degree, where long context models struggle to attend to information in the middle of the context window. Further study is needed to evaluate this. Anecdotal feedback from the community on this issue would be appreciated! ### Benchmarks ARC (25 shot): 60.32 Hellaswag (10 shot): 83.90 MMLU (5 shot): 54.39 ## Prompting: Prompting differs with the airoboros 2.1 models. See [jondurbin/airoboros-l2-13b-2.1](https://huggingface.co/jondurbin/airoboros-l2-13b-2.1) <!-- original-model-card end -->
TheBloke/X-NoroChronos-13B-GPTQ
TheBloke
2023-11-19T17:57:07Z
642
4
transformers
[ "transformers", "safetensors", "llama", "text-generation", "not-for-all-audiences", "nsfw", "base_model:NeverSleep/X-NoroChronos-13B", "license:cc-by-nc-4.0", "autotrain_compatible", "text-generation-inference", "4-bit", "gptq", "region:us" ]
text-generation
2023-11-19T17:11:17Z
--- base_model: NeverSleep/X-NoroChronos-13B inference: false license: cc-by-nc-4.0 model_creator: NeverSleep model_name: X NoroChronos 13B model_type: llama prompt_template: 'Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ' quantized_by: TheBloke tags: - not-for-all-audiences - nsfw --- <!-- markdownlint-disable MD041 --> <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # X NoroChronos 13B - GPTQ - Model creator: [NeverSleep](https://huggingface.co/NeverSleep) - Original model: [X NoroChronos 13B](https://huggingface.co/NeverSleep/X-NoroChronos-13B) <!-- description start --> # Description This repo contains GPTQ model files for [NeverSleep's X NoroChronos 13B](https://huggingface.co/NeverSleep/X-NoroChronos-13B). Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them. These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/). <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/X-NoroChronos-13B-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/X-NoroChronos-13B-GGUF) * [NeverSleep's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/NeverSleep/X-NoroChronos-13B) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Alpaca ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` <!-- prompt-template end --> <!-- licensing start --> ## Licensing The creator of the source model has listed its license as `cc-by-nc-4.0`, and this quantization has therefore used that same license. As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly. In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [NeverSleep's X NoroChronos 13B](https://huggingface.co/NeverSleep/X-NoroChronos-13B). <!-- licensing end --> <!-- README_GPTQ.md-compatible clients start --> ## Known compatible clients / servers These GPTQ models are known to work in the following inference servers/webuis. - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) - [KoboldAI United](https://github.com/henk717/koboldai) - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui) - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) This may not be a complete list; if you know of others, please let me know! <!-- README_GPTQ.md-compatible clients end --> <!-- README_GPTQ.md-provided-files start --> ## Provided files, and GPTQ parameters Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements. Each separate quant is in a different branch. See below for instructions on fetching from different branches. Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers. <details> <summary>Explanation of GPTQ parameters</summary> - Bits: The bit size of the quantised model. - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value. - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now. - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy. - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s). - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences. - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit. </details> | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc | | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- | | [main](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. | | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. | | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. | | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. | | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 14.54 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. | | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. | <!-- README_GPTQ.md-provided-files end --> <!-- README_GPTQ.md-download-from-branches start --> ## How to download, including from branches ### In text-generation-webui To download from the `main` branch, enter `TheBloke/X-NoroChronos-13B-GPTQ` in the "Download model" box. To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/X-NoroChronos-13B-GPTQ:gptq-4bit-32g-actorder_True` ### From the command line I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` To download the `main` branch to a folder called `X-NoroChronos-13B-GPTQ`: ```shell mkdir X-NoroChronos-13B-GPTQ huggingface-cli download TheBloke/X-NoroChronos-13B-GPTQ --local-dir X-NoroChronos-13B-GPTQ --local-dir-use-symlinks False ``` To download from a different branch, add the `--revision` parameter: ```shell mkdir X-NoroChronos-13B-GPTQ huggingface-cli download TheBloke/X-NoroChronos-13B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir X-NoroChronos-13B-GPTQ --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model. The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`. For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell mkdir X-NoroChronos-13B-GPTQ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/X-NoroChronos-13B-GPTQ --local-dir X-NoroChronos-13B-GPTQ --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> ### With `git` (**not** recommended) To clone a specific branch with `git`, use a command like this: ```shell git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/X-NoroChronos-13B-GPTQ ``` Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.) <!-- README_GPTQ.md-download-from-branches end --> <!-- README_GPTQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui) Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/X-NoroChronos-13B-GPTQ`. - To download from a specific branch, enter for example `TheBloke/X-NoroChronos-13B-GPTQ:gptq-4bit-32g-actorder_True` - see Provided Files above for the list of branches for each option. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `X-NoroChronos-13B-GPTQ` 7. The model will automatically load, and is now ready for use! 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. - Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`. 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started! <!-- README_GPTQ.md-text-generation-webui end --> <!-- README_GPTQ.md-use-from-tgi start --> ## Serving this model from Text Generation Inference (TGI) It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0` Example Docker parameters: ```shell --model-id TheBloke/X-NoroChronos-13B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096 ``` Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later): ```shell pip3 install huggingface-hub ``` ```python from huggingface_hub import InferenceClient endpoint_url = "https://your-endpoint-url-here" prompt = "Tell me about AI" prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ''' client = InferenceClient(endpoint_url) response = client.text_generation(prompt, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1) print(f"Model output: {response}") ``` <!-- README_GPTQ.md-use-from-tgi end --> <!-- README_GPTQ.md-use-from-python start --> ## Python code example: inference from this GPTQ model ### Install the necessary packages Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later. ```shell pip3 install --upgrade transformers optimum # If using PyTorch 2.1 + CUDA 12.x: pip3 install --upgrade auto-gptq # or, if using PyTorch 2.1 + CUDA 11.x: pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ ``` If you are using PyTorch 2.0, you will need to install AutoGPTQ from source. Likewise if you have problems with the pre-built wheels, you should try building from source: ```shell pip3 uninstall -y auto-gptq git clone https://github.com/PanQiWei/AutoGPTQ cd AutoGPTQ git checkout v0.5.1 pip3 install . ``` ### Example Python code ```python from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline model_name_or_path = "TheBloke/X-NoroChronos-13B-GPTQ" # To use a different branch, change revision # For example: revision="gptq-4bit-32g-actorder_True" model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto", trust_remote_code=False, revision="main") tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) prompt = "Tell me about AI" prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ''' print("\n\n*** Generate:") input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda() output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512) print(tokenizer.decode(output[0])) # Inference can also be done using transformers' pipeline print("*** Pipeline:") pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1 ) print(pipe(prompt_template)[0]['generated_text']) ``` <!-- README_GPTQ.md-use-from-python end --> <!-- README_GPTQ.md-compatibility start --> ## Compatibility The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly. [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama and Mistral models in 4-bit. Please see the Provided Files table above for per-file compatibility. For a list of clients/servers, please see "Known compatible clients / servers", above. <!-- README_GPTQ.md-compatibility end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: NeverSleep's X NoroChronos 13B <!-- description start --> ## Description This repo contains fp16 files of X-NoroChronos-13B, a merge based around [Xwin-LM/Xwin-LM-13B-V0.2](https://huggingface.co/Xwin-LM/Xwin-LM-13B-V0.2) and [elinas/chronos-13b-v2](https://huggingface.co/elinas/chronos-13b-v2). Merge was done by choosing carefully the models, the loras, the weights of each of them, the order in which they are applied, and the order of the final models merging with the main goal of having a fresh RP experience. <!-- description end --> <!-- description start --> ## Models and loras used - [Xwin-LM/Xwin-LM-13B-V0.2](https://huggingface.co/Xwin-LM/Xwin-LM-13B-V0.2) - [elinas/chronos-13b-v2](https://huggingface.co/elinas/chronos-13b-v2) - [Doctor-Shotgun/cat-v1.0-13b](https://huggingface.co/Doctor-Shotgun/cat-v1.0-13b) - [athirdpath/Eileithyia-13B](https://huggingface.co/athirdpath/Eileithyia-13B) - [NeverSleep/Noromaid-13b-v0.1.1](https://huggingface.co/NeverSleep/Noromaid-13b-v0.1.1) - [Undi95/Llama2-13B-no_robots-alpaca-lora](https://huggingface.co/Undi95/Llama2-13B-no_robots-alpaca-lora) - [zattio770/120-Days-of-LORA-v2-13B](https://huggingface.co/zattio770/120-Days-of-LORA-v2-13B) - [lemonilia/LimaRP-Llama2-13B-v3-EXPERIMENT](https://huggingface.co/lemonilia/LimaRP-Llama2-13B-v3-EXPERIMENT) - [Aesir Private RP dataset] - Thanks to the [MinvervaAI Team](https://huggingface.co/MinervaAI) and, in particular, [Gryphe](https://huggingface.co/Gryphe) for letting us use it! <!-- description end --> <!-- prompt-template start --> ## Prompt template: Alpaca ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` If you want to support me, you can [here](https://ko-fi.com/undiai). If you want to know more about [Ikari](https://huggingface.co/IkariDev) work, you can visit his [retro/neocities style website](https://ikaridevgit.github.io/).
ManojAlexender/Finetuned_Final_LM_200k
ManojAlexender
2024-02-14T14:53:27Z
642
0
transformers
[ "transformers", "safetensors", "roberta", "text-classification", "generated_from_trainer", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-classification
2024-02-14T12:03:06Z
--- tags: - generated_from_trainer metrics: - accuracy - f1 - precision - recall model-index: - name: Finetuned_Final_LM_200k results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # Finetuned_Final_LM_200k This model was trained from scratch on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 2.5453 - Accuracy: 0.8429 - F1: 0.8410 - Precision: 0.8604 - Recall: 0.8429 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 16 - eval_batch_size: 64 - seed: 42 - gradient_accumulation_steps: 2 - total_train_batch_size: 32 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 50 - num_epochs: 2 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall | |:-------------:|:-----:|:-----:|:---------------:|:--------:|:------:|:---------:|:------:| | 0.1882 | 0.08 | 500 | 0.7728 | 0.8338 | 0.8300 | 0.8666 | 0.8338 | | 0.1178 | 0.16 | 1000 | 1.0142 | 0.8365 | 0.8349 | 0.8494 | 0.8365 | | 0.2868 | 0.24 | 1500 | 2.3359 | 0.8444 | 0.8423 | 0.8636 | 0.8444 | | 0.3269 | 0.32 | 2000 | 2.4489 | 0.8399 | 0.8375 | 0.8607 | 0.8399 | | 0.1704 | 0.4 | 2500 | 2.3116 | 0.8440 | 0.8424 | 0.8593 | 0.8440 | | 0.2567 | 0.48 | 3000 | 2.3376 | 0.8403 | 0.8384 | 0.8565 | 0.8403 | | 0.1004 | 0.56 | 3500 | 2.1410 | 0.8440 | 0.8420 | 0.8625 | 0.8440 | | 0.1368 | 0.64 | 4000 | 2.3633 | 0.8463 | 0.8446 | 0.8617 | 0.8463 | | 0.1003 | 0.72 | 4500 | 2.3986 | 0.8437 | 0.8418 | 0.8605 | 0.8437 | | 0.1889 | 0.8 | 5000 | 2.5537 | 0.8437 | 0.8419 | 0.8595 | 0.8437 | | 0.0424 | 0.88 | 5500 | 2.4177 | 0.8440 | 0.8420 | 0.8625 | 0.8440 | | 0.3186 | 0.96 | 6000 | 2.5633 | 0.8429 | 0.8411 | 0.8594 | 0.8429 | | 0.2532 | 1.04 | 6500 | 2.4783 | 0.8433 | 0.8413 | 0.8615 | 0.8433 | | 0.1323 | 1.12 | 7000 | 2.5693 | 0.8440 | 0.8421 | 0.8620 | 0.8440 | | 0.1018 | 1.2 | 7500 | 2.5286 | 0.8440 | 0.8420 | 0.8623 | 0.8440 | | 0.1762 | 1.28 | 8000 | 2.4495 | 0.8429 | 0.8408 | 0.8620 | 0.8429 | | 0.2621 | 1.36 | 8500 | 2.3865 | 0.8448 | 0.8428 | 0.8633 | 0.8448 | | 0.0256 | 1.44 | 9000 | 2.4784 | 0.8459 | 0.8439 | 0.8646 | 0.8459 | | 0.1207 | 1.52 | 9500 | 2.5304 | 0.8440 | 0.8422 | 0.8607 | 0.8440 | | 0.1659 | 1.6 | 10000 | 2.5637 | 0.8433 | 0.8413 | 0.8610 | 0.8433 | | 0.196 | 1.68 | 10500 | 2.5453 | 0.8429 | 0.8410 | 0.8604 | 0.8429 | ### Framework versions - Transformers 4.37.0 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
lmstudio-community/WizardLM-2-7B-GGUF
lmstudio-community
2024-04-16T16:32:06Z
642
17
null
[ "gguf", "text-generation", "license:apache-2.0", "region:us" ]
text-generation
2024-04-15T22:51:45Z
--- license: apache-2.0 quantized_by: bartowski pipeline_tag: text-generation lm_studio: param_count: 7b use_case: general release_date: 15-04-2024 model_creator: microsoft prompt_template: vicuna system_prompt: A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. base_model: mistral original_repo: microsoft/WizardLM-2-7B --- ## 💫 Community Model> WizardLM-2-7B by Microsoft *👾 [LM Studio](https://lmstudio.ai) Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on [Discord](https://discord.gg/aPQfnNkxGC)*. **Model creator:** [Microsoft](https://huggingface.co/microsoft)<br> **Original model**: [WizardLM-2-7B](https://huggingface.co/microsoft/WizardLM-2-7B)<br> **GGUF quantization:** provided by [bartowski](https://huggingface.co/bartowski) based on `llama.cpp` release [b2675](https://github.com/ggerganov/llama.cpp/releases/tag/b2675)<br> ## Model Summary: WizardLM 2 7B is a followup model to the original and highly successful WizardLM line of models. This model is trained to excel at multi-turn conversations, and does so very successfully, outclassing models more than twice its size.<br> This model should be used for general conversation and world knowledge, but as with most models these days will be relatively competent at coding and reasoning as well. ## Prompt Template: For now, you'll need to make your own template. Choose the `LM Studio Blank Preset` in your LM Studio. Then, set the system prompt to whatever you'd like (check the recommended one below), and set the following values:<br> `System Message Suffix`: ''<br> `User Message Prefix`: ' USER: '<br> `User Message Suffix`: ' ASSISTANT: ' Under the hood, the model will see a prompt that's formatted like so: ``` A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {prompt} ASSISTANT: </s> ``` ## Use case and examples WizardLM 2 was tuned for improved performance on complex chat, multilingual, reasoning and agent tasks. This makes it a great model to use when wanting to chat back and forth and have reasoning based discussions. ### World knowledge: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/ka5C0km4sZz5fhiiWU58V.png) ## Conversational: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/Xc4eZ6vsO0tSJyWiNFNPC.png) ## Coding: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/6QM1IlZy6Wc9U5T6z7b9y.png) ## Technical Details WizardLM 2 applies several new methods for training compared to the original iteration, truly showing just how much the Open Source AI world has advanced since their intial offerings. The first of which is Progress Learning. Rather than applying all training data at once, the team applied stage-by-stage training by partitioning the data into multiple sections and training on each one after the other. AI Align AI (AAA) is another new process, whereby various state-of-the-art LLMs are allowed to co-teach and improve from each other, using simulated chats, quality judging, and improvement suggestions. They also participate in self-teaching in a similar manor. The model then underwent Supervised Learning, Stage-DPO, and Evol-Instruct and Instruction&Process Supervised Reinforcement Learning (RLEIF) which uses an instruction quality reward model and a supervision reward model for more precise correctness. The results are a model that performs exceptionally well on the automatic MT-Bench evaluation. For more information, check the WizardLM2 blog post [here](https://wizardlm.github.io/WizardLM2/) ## Special thanks 🙏 Special thanks to [Georgi Gerganov](https://github.com/ggerganov) and the whole team working on [llama.cpp](https://github.com/ggerganov/llama.cpp/) for making all of this possible. 🙏 Special thanks to [Kalomaze](https://github.com/kalomaze) for his dataset (linked [here](https://github.com/ggerganov/llama.cpp/discussions/5263)) that was used for calculating the imatrix for these quants, which improves the overall quality! ## Disclaimers LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Community Model is the sole responsibility of the person or entity who originated such Model. LM Studio may not monitor or control the Community Models and cannot, and does not, take responsibility for any such Model. LM Studio disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Community Models. LM Studio further disclaims any warranty that the Community Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Community Models, your downloading of any Community Model, or use of any other Community Model provided by or through LM Studio.
LiteLLMs/Llama-3-Smaug-8B-GGUF
LiteLLMs
2024-04-30T06:36:35Z
642
1
transformers
[ "transformers", "gguf", "GGUF", "dataset:aqua_rat", "dataset:microsoft/orca-math-word-problems-200k", "dataset:m-a-p/CodeFeedback-Filtered-Instruction", "dataset:anon8231489123/ShareGPT_Vicuna_unfiltered", "arxiv:2402.13228", "license:llama2", "endpoints_compatible", "region:us" ]
null
2024-04-29T21:00:25Z
--- license: llama2 library_name: transformers tags: - GGUF datasets: - aqua_rat - microsoft/orca-math-word-problems-200k - m-a-p/CodeFeedback-Filtered-Instruction - anon8231489123/ShareGPT_Vicuna_unfiltered quantized_by: andrijdavid --- # Llama-3-Smaug-8B-GGUF - Original model: [Llama-3-Smaug-8B](https://huggingface.co/abacusai/Llama-3-Smaug-8B) <!-- description start --> ## Description This repo contains GGUF format model files for [Llama-3-Smaug-8B](https://huggingface.co/abacusai/Llama-3-Smaug-8B). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). This is the source project for GGUF, providing both a Command Line Interface (CLI) and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), Known as the most widely used web UI, this project boasts numerous features and powerful extensions, and supports GPU acceleration. * [Ollama](https://github.com/jmorganca/ollama) Ollama is a lightweight and extensible framework designed for building and running language models locally. It features a simple API for creating, managing, and executing models, along with a library of pre-built models for use in various applications​ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), A comprehensive web UI offering GPU acceleration across all platforms and architectures, particularly renowned for storytelling. * [GPT4All](https://gpt4all.io), This is a free and open source GUI that runs locally, supporting Windows, Linux, and macOS with full GPU acceleration. * [LM Studio](https://lmstudio.ai/) An intuitive and powerful local GUI for Windows and macOS (Silicon), featuring GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui). A notable web UI with a variety of unique features, including a comprehensive model library for easy model selection. * [Faraday.dev](https://faraday.dev/), An attractive, user-friendly character-based chat GUI for Windows and macOS (both Silicon and Intel), also offering GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), A Python library equipped with GPU acceleration, LangChain support, and an OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), A Rust-based ML framework focusing on performance, including GPU support, and designed for ease of use. * [ctransformers](https://github.com/marella/ctransformers), A Python library featuring GPU acceleration, LangChain support, and an OpenAI-compatible AI server. * [localGPT](https://github.com/PromtEngineer/localGPT) An open-source initiative enabling private conversations with documents. <!-- README_GGUF.md-about-gguf end --> <!-- compatibility_gguf start --> ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single folder. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: LiteLLMs/Llama-3-Smaug-8B-GGUF and below it, a specific filename to download, such as: Q4_0/Q4_0-00001-of-00009.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download LiteLLMs/Llama-3-Smaug-8B-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download LiteLLMs/Llama-3-Smaug-8B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install huggingface_hub[hf_transfer] ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download LiteLLMs/Llama-3-Smaug-8B-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m Q4_0/Q4_0-00001-of-00009.gguf --color -c 8192 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<PROMPT>" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 8192` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./Q4_0/Q4_0-00001-of-00009.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<PROMPT>", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./Q4_0/Q4_0-00001-of-00009.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer end --> <!-- original-model-card start --> # Original model card: Llama-3-Smaug-8B # Llama-3-Smaug-8B ### Built with Meta Llama 3 ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64c14f95cac5f9ba52bbcd7f/OrcJyTaUtD2HxJOPPwNva.png) This model was built using the Smaug recipe for improving performance on real world multi-turn conversations applied to [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B). ### Model Description - **Developed by:** [Abacus.AI](https://abacus.ai) - **License:** https://llama.meta.com/llama3/license/ - **Finetuned from model:** [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B). ## Evaluation ### MT-Bench ``` ########## First turn ########## score model turn Llama-3-Smaug-8B 1 8.77500 Meta-Llama-3-8B-Instruct 1 8.1 ########## Second turn ########## score model turn Meta-Llama-3-8B-Instruct 2 8.2125 Llama-3-Smaug-8B 2 7.8875 ########## Average ########## score model Llama-3-Smaug-8B 8.331250 Meta-Llama-3-8B-Instruct 8.15625 ``` | Model | First turn | Second Turn | Average | | - | -: | : | | Llama-3-Smaug-8B | 8.78 | 7.89 | 8.33 | | Llama-3-8B-Instruct | 8.1 | 8.21 | 8.16 | This version of Smaug uses new techniques and new data compared to [Smaug-72B](https://huggingface.co/abacusai/Smaug-72B-v0.1), and more information will be released later on. For now, see the previous Smaug paper: https://arxiv.org/abs/2402.13228. <!-- original-model-card end -->
zeroblu3/NeuralPoppy-EVO-L3-imat.GGUF
zeroblu3
2024-06-03T21:42:32Z
642
2
null
[ "gguf", "license:llama3", "region:us" ]
null
2024-06-02T21:01:05Z
--- license: llama3 --- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6331279e2f289a0e1b1f63be/KU_nXJ0GMbc_MfQbB0g7K.png) Imatrix Quants of https://huggingface.co/zeroblu3/NeuralPoppy-EVO-L3-8B A megamerge of 10 selected models merged with the "Model Stock" method, using Poppy Porpoise 0.72 as a base. Pretty good at all tasks, strong focus on RP and storytelling, uncensored (does pretty much everything if you ask it to), large knowledge base. ST Presets in the repo.
Qwen/Qwen2-0.5B-Instruct-AWQ
Qwen
2024-06-06T14:33:56Z
642
2
transformers
[ "transformers", "safetensors", "qwen2", "text-generation", "chat", "conversational", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "4-bit", "awq", "region:us" ]
text-generation
2024-06-06T06:19:20Z
--- license: apache-2.0 language: - en pipeline_tag: text-generation tags: - chat --- # Qwen2-0.5B-Instruct-AWQ ## Introduction Qwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the instruction-tuned 0.5B Qwen2 model. Compared with the state-of-the-art opensource language models, including the previous released Qwen1.5, Qwen2 has generally surpassed most opensource models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, reasoning, etc. For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2/), [GitHub](https://github.com/QwenLM/Qwen2), and [Documentation](https://qwen.readthedocs.io/en/latest/). <br> ## Model Details Qwen2 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes. ## Training details We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization. ## Requirements The code of Qwen2 has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`, or you might encounter the following error: ``` KeyError: 'qwen2' ``` ## Quickstart Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents. ```python from transformers import AutoModelForCausalLM, AutoTokenizer device = "cuda" # the device to load the model onto model = AutoModelForCausalLM.from_pretrained( "Qwen/Qwen2-0.5B-Instruct-AWQ", torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-0.5B-Instruct-AWQ") prompt = "Give me a short introduction to large language model." messages = [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) model_inputs = tokenizer([text], return_tensors="pt").to(device) generated_ids = model.generate( model_inputs.input_ids, max_new_tokens=512 ) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] ``` ## Benchmark and Speed To compare the generation performance between bfloat16 (bf16) and quantized models such as GPTQ-Int8, GPTQ-Int4, and AWQ, please consult our [Benchmark of Quantized Models](https://qwen.readthedocs.io/en/latest/benchmark/quantization_benchmark.html). This benchmark provides insights into how different quantization techniques affect model performance. For those interested in understanding the inference speed and memory consumption when deploying these models with either ``transformer`` or ``vLLM``, we have compiled an extensive [Speed Benchmark](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html). ## Citation If you find our work helpful, feel free to give us a cite. ``` @article{qwen2, title={Qwen2 Technical Report}, year={2024} } ```
emanjavacas/GysBERT
emanjavacas
2023-11-28T14:15:35Z
641
3
transformers
[ "transformers", "pytorch", "bert", "nl", "license:mit", "endpoints_compatible", "region:us" ]
null
2022-09-21T14:01:23Z
--- license: mit language: - nl --- # GysBERT v1 This model is a Historical Language Model for Dutch coming from the [MacBERTh project](https://macberth.netlify.app/). The architecture is based on BERT base uncased from the original BERT pre-training codebase. The training material comes mostly from the DBNL and the Delpher newspaper dump. The details can be found in the accompanying publication: [Non-Parametric Word Sense Disambiguation for Historical Languages](https://aclanthology.org/2022.nlp4dh-1.16.pdf) The model has been successfully tested on Word Sense Disambiguation tasks as discussed in the referenced paper above. An updated version with an enlarged pre-training dataset is due soon.
NousResearch/Nous-Capybara-7B-V1-GGUF
NousResearch
2023-12-28T12:55:51Z
641
35
null
[ "gguf", "llama-2", "sft", "eng", "dataset:LDJnr/Capybara", "dataset:LDJnr/LessWrong-Amplify-Instruct", "dataset:LDJnr/Pure-Dove", "dataset:LDJnr/Verified-Camel", "license:mit", "region:us" ]
null
2023-09-20T01:53:14Z
--- language: - eng tags: - llama-2 - sft license: - mit datasets: - LDJnr/Capybara - LDJnr/LessWrong-Amplify-Instruct - LDJnr/Pure-Dove - LDJnr/Verified-Camel --- ## **Nous-Capybara-7B-GGUF** A model created with a novel synthesis method in mind, Amplify-instruct, with a goal of having a synergistic combination of different techniques used for SOTA models such as Evol-Instruct, Orca, Vicuna, Lamini, FLASK and others, all into one lean holistically formed dataset and model. The seed instructions used for the start of synthesized conversations are largely based on highly acclaimed datasets like Airoboros, Know logic, EverythingLM, GPTeacher and even entirely new seed instructions derived from posts on the website LessWrong, as well as being supplemented with certain multi-turn datasets like Dove(A successor to Puffin). Entirely contained within 20K training examples, mostly comprised of newly synthesized tokens never used for model training until now! ## Process of creation and special thank yous! This model was fine-tuned by Nous Research, with LDJ leading the training and dataset curation, along with significant dataset formation contributions by J-Supha, Also thank you to Emozilla for also assisting to expedite the training experimentation process. Special thank you to **A16Z** for sponsoring our training, as well as **Yield Protocol** for their support in resources during R&D of aspects outside of training, such as dataset development/synthesis. ## Thank you to dataset creators! While most of the tokens within Capybara are newly synthsized and part of datasets like Puffin/Dove, we would like to credit the single-turn datasets we leveraged as seeds that are used to initiate the beggining of many of the multi-turn conversations: ![Capybara](https://i.imgur.com/yB58OoD.jpeg) ## Model Training Nous-Capybara 7B is a new model trained for multiple epochs on a dataset of less than 20,000 carefully curated GPT-4 examples, most of which are long context conversations between a real human and GPT-4 comprised of entirely newly synthesized tokens that previously didn't exist on HuggingFace. Additional data came from manually curated CamelAI data, with the help of volunteers ranging from former Physicists, Mathematicians, Biologists and more! Specific credits to the people involved in validating this data will be posted soon :) ## Prompt Format The reccomended model usage is: ``` USER: ASSISTANT: ``` ## Notable Features: - The first Nous model trained on over 10,000 multi-turn conversations. - Over 1,000 tokens average per conversation example during training! - Able to effectively do complex summary of advanced studies on topics. - Ability to recall information upto late 2022 without internet (ChatGPT cut off date is in 2021) - Context length of 4096 tokens, and fine-tuned on a significant amount of multi-turn conversations reaching that full token limit. - Includes a portion of conversational data synthesized from less wrong posts, speaking in-depth about the nature of rationality, reasoning and self-improvement. ## Example Outputs!: ![Capybara](https://img001.prntscr.com/file/img001/T9yYxR1xQSaK_UGdy3t2Cw.png) ![Capybara](https://img001.prntscr.com/file/img001/DQXqmKbsQQOIcgny1eoGNA.png) ![Capybara](https://img001.prntscr.com/file/img001/85X3L9ZxTsOKo3fUQ7GRVA.png) ## Benchmarks! (Important to note that all mentioned benchmarks are single-turn and don't test multi-turn capabilities, Capybara should excel even further at multi-turn conversational tasks.) ![Capybara](https://i.imgur.com/n8lkmyK.png) ## Limitations We noticed that the current version of Capybara still has some issues in some situations with censoring itself and not acting as expected in certain edge cases, we plan to have this largely resolved in the near future with Capybara 1.1 ## Future Changes This is a relatively early build amongst the grand plans for the future of Capybara! Current limitations: We are still running experimentation and tests for the training pipeline and dataset cleaning process to be more refined, we plan to release a Capybara 1.1 with these improvements. ## Future model sizes We plan on releasing a 3B, 13B and 70B version, as well as a potential 1B version based on phi-1.5 or similar architectures. ## How you can help! In the near future we plan on leveraging the help of domain specific expert volunteers to eliminate any mathematically/verifiably incorrect answers from our training curations. If you have at-least a bachelors in mathematics, physics, biology or chemistry and would like to volunteer even just 30 minutes of your expertise time, please contact LDJ on discord! ## Dataset contamination. We checked for 100%, 99%, 98% and 97% similarity matches between our data and many popular benchmarks, we found no exact matches! The following are benchmarks we checked for contamination for: - HumanEval - AGIEval - TruthfulQA - MMLU - GPT4All Citation: ``` @article{daniele2023amplify-instruct, title={Amplify-Instruct: Synthetically Generated Diverse Multi-turn Conversations for Effecient LLM Training.}, author={Daniele, Luigi and Suphavadeeprasit}, journal={arXiv preprint arXiv:(comming soon)}, year={2023} } ```
brittlewis12/gemma-7b-GGUF
brittlewis12
2024-02-21T15:58:40Z
641
1
null
[ "gguf", "text-generation", "en", "arxiv:2009.03300", "arxiv:1905.07830", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1905.10044", "arxiv:1907.10641", "arxiv:1811.00937", "arxiv:1809.02789", "arxiv:1911.01547", "arxiv:1705.03551", "arxiv:2107.03374", "arxiv:2108.07732", "arxiv:2110.14168", "arxiv:2304.06364", "arxiv:2206.04615", "arxiv:2009.11462", "arxiv:2101.11718", "arxiv:2110.08193", "arxiv:1804.09301", "arxiv:2109.07958", "arxiv:1804.06876", "arxiv:2203.09509", "base_model:google/gemma-7b", "license:other", "region:us" ]
text-generation
2024-02-21T14:54:12Z
--- base_model: google/gemma-7b inference: false language: - en model_creator: google model_name: gemma-7b model_type: gemma pipeline_tag: text-generation license: other license_name: gemma-terms-of-use license_link: https://ai.google.dev/gemma/terms quantized_by: brittlewis12 --- # Gemma 7B GGUF **Original model**: [gemma-7b](https://huggingface.co/google/gemma-7b) **Model creator**: [google](https://huggingface.co/google) This repo contains GGUF format model files for Google’s Gemma-7B. > Gemma is a family of lightweight, state-of-the-art open models from Google, > built from the same research and technology used to create the Gemini models. > They are text-to-text, decoder-only large language models, available in English, > with open weights, pre-trained variants, and instruction-tuned variants. Gemma > models are well-suited for a variety of text generation tasks, including > question answering, summarization, and reasoning. Their relatively small size > makes it possible to deploy them in environments with limited resources such as > a laptop, desktop or your own cloud infrastructure, democratizing access to > state of the art AI models and helping foster innovation for everyone. Learn more on Google’s [Model page](https://ai.google.dev/gemma/docs). ### What is GGUF? GGUF is a file format for representing AI models. It is the third version of the format, introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Converted using llama.cpp build 2226 (revision [eccd7a2](https://github.com/ggerganov/llama.cpp/commit/eccd7a26ddbff19e4b8805648f5f14c501957859)) --- ## Download & run with [cnvrs](https://twitter.com/cnvrsai) on iPhone, iPad, and Mac! ![cnvrs.ai](https://pbs.twimg.com/profile_images/1744049151241797632/0mIP-P9e_400x400.jpg) [cnvrs](https://testflight.apple.com/join/sFWReS7K) is the best app for private, local AI on your device: - create & save **Characters** with custom system prompts & temperature settings - download and experiment with any **GGUF model** you can [find on HuggingFace](https://huggingface.co/models?library=gguf)! - make it your own with custom **Theme colors** - powered by Metal ⚡️ & [Llama.cpp](https://github.com/ggerganov/llama.cpp), with **haptics** during response streaming! - **try it out** yourself today, on [Testflight](https://testflight.apple.com/join/sFWReS7K)! - follow [cnvrs on twitter](https://twitter.com/cnvrsai) to stay up to date --- ## Original Model Evaluation | Benchmark | Metric | 2B Params | 7B Params | | ------------------------------ | ------------- | ----------- | --------- | | [MMLU](https://arxiv.org/abs/2009.03300) | 5-shot, top-1 | 42.3 | 64.3 | | [HellaSwag](https://arxiv.org/abs/1905.07830) | 0-shot |71.4 | 81.2 | | [PIQA](https://arxiv.org/abs/1911.11641) | 0-shot | 77.3 | 81.2 | | [SocialIQA](https://arxiv.org/abs/1904.09728) | 0-shot | 59.7 | 51.8 | | [BooIQ](https://arxiv.org/abs/1905.10044) | 0-shot | 69.4 | 83.2 | | [WinoGrande](https://arxiv.org/abs/1907.10641) | partial score | 65.4 | 72.3 | | [CommonsenseQA](https://arxiv.org/abs/1811.00937) | 7-shot | 65.3 | 71.3 | | [OpenBookQA](https://arxiv.org/abs/1809.02789) | | 47.8 | 52.8 | | [ARC-e](https://arxiv.org/abs/1911.01547) | | 73.2 | 81.5 | | [ARC-c](https://arxiv.org/abs/1911.01547) | | 42.1 | 53.2 | | [TriviaQA](https://arxiv.org/abs/1705.03551) | 5-shot | 53.2 | 63.4 | | [Natural Questions](https://github.com/google-research-datasets/natural-questions) | 5-shot | - | 23 | | [HumanEval](https://arxiv.org/abs/2107.03374) | pass@1 | 22.0 | 32.3 | | [MBPP](https://arxiv.org/abs/2108.07732) | 3-shot | 29.2 | 44.4 | | [GSM8K](https://arxiv.org/abs/2110.14168) | maj@1 | 17.7 | 46.4 | | [MATH](https://arxiv.org/abs/2108.07732) | 4-shot | 11.8 | 24.3 | | [AGIEval](https://arxiv.org/abs/2304.06364) | | 24.2 | 41.7 | | [BIG-Bench](https://arxiv.org/abs/2206.04615) | | 35.2 | 55.1 | | **Average** | | **54.0** | **56.4** | | Benchmark | Metric | 2B Params | 7B Params | | ------------------------------ | ------------- | ----------- | --------- | | [RealToxicity](https://arxiv.org/abs/2009.11462) | average | 6.86 | 7.90 | | [BOLD](https://arxiv.org/abs/2101.11718) | | 45.57 | 49.08 | | [CrowS-Pairs](https://aclanthology.org/2020.emnlp-main.154/) | top-1 | 45.82 | 51.33 | | [BBQ Ambig](https://arxiv.org/abs/2110.08193v2) | 1-shot, top-1 | 62.58 | 92.54 | | [BBQ Disambig](https://arxiv.org/abs/2110.08193v2) | top-1 | 54.62 | 71.99 | | [Winogender](https://arxiv.org/abs/1804.09301) | top-1 | 51.25 | 54.17 | | [TruthfulQA](https://arxiv.org/abs/2109.07958) | | 44.84 | 31.81 | | [Winobias 1_2](https://arxiv.org/abs/1804.06876) | | 56.12 | 59.09 | | [Winobias 2_2](https://arxiv.org/abs/1804.06876) | | 91.10 | 92.23 | | [Toxigen](https://arxiv.org/abs/2203.09509) | | 29.77 | 39.59 |
jienengchen/ViTamin-XL-384px
jienengchen
2024-04-08T05:44:33Z
641
17
transformers
[ "transformers", "pytorch", "feature-extraction", "custom_code", "dataset:mlfoundations/datacomp_1b", "arxiv:2404.02132", "license:mit", "region:us" ]
feature-extraction
2024-04-02T23:56:49Z
--- license: mit datasets: - mlfoundations/datacomp_1b pipeline_tag: feature-extraction --- # Model card for ViTamin-XL-336px Official huggingface models of **ViTamin**, from the following CVPR 2024 paper: [ViTamin: Design Scalable Vision Models in the Vision-language Era](https://arxiv.org/pdf/2404.02132.pdf).\ ✨ &ensp;[Jieneng Chen](https://beckschen.github.io), [Qihang Yu](https://yucornetto.github.io/), [Xiaohui Shen](https://xiaohuishen.github.io/), [Alan Yuille](https://www.cs.jhu.edu/~ayuille/) and [Liang-Chieh Chen](http://liangchiehchen.com/)\ 🏠 &ensp;Johns Hopkins University, Bytedance Load from HuggingFace with transformers.AutoModel: ```python import torch import open_clip from PIL import Image from transformers import AutoModel, CLIPImageProcessor device = "cuda" if torch.cuda.is_available() else "cpu" model = AutoModel.from_pretrained( 'jienengchen/ViTamin-XL-384px', trust_remote_code=True).to(device).eval() image = Image.open('./image.png').convert('RGB') image_processor = CLIPImageProcessor.from_pretrained('jienengchen/ViTamin-XL-384px') pixel_values = image_processor(images=image, return_tensors='pt').pixel_values pixel_values = pixel_values.to(torch.bfloat16).cuda() tokenizer = open_clip.get_tokenizer('hf-hub:laion/CLIP-ViT-L-14-DataComp.XL-s13B-b90K') text = tokenizer(["a photo of vitamin", "a dog", "a cat"]).to(device) with torch.no_grad(), torch.cuda.amp.autocast(): image_features, text_features, logit_scale = model(pixel_values, text) text_probs = (100.0 * image_features @ text_features.to(torch.float).T).softmax(dim=-1) print("Label probs:", text_probs) ``` ## Main Results with CLIP Pre-training on DataComp-1B | image encoder | image size | num patches | text encoder depth/width | seen samples (B) | trainable params Image+Text (M) | MACs Image+Text (G) | ImageNet Acc. | avg. 38 datasets | ImageNet dist. shift. | VTAB | retrieval | |---------------|------------|-------------|--------------------------|-------------------|---------------------------------|----------------------|---------------|------------------|-----------------------|------|-----------| | ViTamin-L | 224 | 196 | 12/768 | 12.8 | 333.3+123.7 | 72.6+6.6 | 80.8 | 66.7 | 69.8 | 65.3 | 60.3 | | ViTamin-L | 256 | 256 | 12/768 | 12.8+0.2 | 333.4+123.7 | 94.8+6.6 | 81.2 | 67.0 | 71.1 | 65.3 | 61.2 | | ViTamin-L | 336 | 441 | 12/768 | 12.8+0.2 | 333.6+123.7 | 163.4+6.6 | 81.6 | 67.0 | 72.1 | 64.4 | 61.6 | | ViTamin-L | 384 | 576 | 12/768 | 12.8+0.2 | 333.7+123.7 | 213.4+6.6 | 81.8 | 67.2 | 72.4 | 64.7 | 61.8 | | ViTamin-L2 | 224 | 196 | 24/1024 | 12.8 | 333.6+354.0 | 72.6+23.3 | 80.9 | 66.4 | 70.6 | 63.4 | 61.5 | | ViTamin-L2 | 256 | 256 | 24/1024 | 12.8+0.5 | 333.6+354.0 | 94.8+23.3 | 81.5 | 67.4 | 71.9 | 64.1 | 63.1 | | ViTamin-L2 | 336 | 441 | 24/1024 | 12.8+0.5 | 333.8+354.0 | 163.4+23.3 | 81.8 | 67.8 | 73.0 | 64.5 | 63.6 | | ViTamin-L2 | 384 | 576 | 24/1024 | 12.8+0.5 | 334.0+354.0 | 213.4+23.3 | 82.1 | 68.1 | 73.4 | 64.8 | 63.7 | | ViTamin-XL | 256 | 256 | 27/1152 | 12.8+0.5 | 436.1+488.7 | 125.3+33.1 | 82.1 | 67.6 | 72.3 | 65.4 | 62.7 | | ViTamin-XL | 384 | 576 | 27/1152 | 12.8+0.5 | 436.1+488.7 | 281.9+33.1 | 82.6 | 68.1 | 73.6 | 65.6 | 63.8 | | ViTamin-XL | 256 | 256 | 27/1152 | 40 | 436.1+488.7 | 125.3+33.1 | 82.3 | 67.5 | 72.8 | 64.0 | 62.1 | | ViTamin-XL | 336 | 441 | 27/1152 | 40+1 | 436.1+488.7 | 215.9+33.1 | 82.7 | 68.0 | 73.9 | 64.1 | 62.6 | | ViTamin-XL | 384 | 576 | 27/1152 | 40+1 | 436.1+488.7 | 281.9+33.1 | 82.9 | 68.1 | 74.1 | 64.0 | 62.5 | ## Main Results on Downstream tasks **Open-Vocab Detection** | image encoder | detector | OV-COCO (AP<sub>50</sub><sup>novel</sup>) | OV-LVIS (AP<sub>r</sub>) | |---------------|----------|---------------------------------------|-----------------------| | ViT-L/14 | Sliding F-ViT | 36.1 | 32.5 | | ViTamin-L | Sliding F-ViT | 37.5 | 35.6 | **Open-Vocab Segmentation** | image encoder | segmentor | ADE | Cityscapes | MV | A-150 | A-847 | PC-459 | PC-59 | PAS-21 | |---------------|-------------|----------------|--------------|------|-------|-------|--------|-------|--------------------| | ViT-L/14 | Sliding FC-CLIP | 24.6 | 40.7 | 16.5 | 31.8 | 14.3 | 18.3 | 55.1 | 81.5 | | ViTamin-L | Sliding FC-CLIP | 27.3 | 44.0 | 18.2 | 35.6 | 16.1 | 20.4 | 58.4 | 83.4 | Note: Panoptic dataset (ADE, CityScapes, MV) are with the metric of PQ. Semantic dataset (A-150, A-847, PC-459, PC-59, PAS-21) are with the metric of mIoU. **Large Multi-modal Models** | image encoder | image size | VQAv2 | GQA | VizWiz | SQA | T-VQA | POPE | MME | MM-Bench | MM-B-CN | SEED | LLaVA-Wild | MM-Vet | |---------------|----------|-------|------|--------|------|-------|------|------|----------|---------|------|------------|--------| | ViTamin-L | 336 | 78.4 | 61.6 | 51.1 | 66.9 | 58.7 | 84.6 | 1421 | 65.4 | 58.4 | 57.7 | 64.5 | 33.6 | | ViTamin-L | 384 | 78.9 | 61.6 | 55.4 | 67.6 | 59.8 | 85.5 | 1447 | 64.5 | 58.3 | 57.9 | 66.1 | 33.6 | ## Citing ViTamin ``` @inproceedings{chen2024vitamin, title={ViTamin: Design Scalable Vision Models in the Vision-language Era}, author={Chen, Jieneng and Yu, Qihang and Shen, Xiaohui and Yuille, ALan and Chen, Liang-Chieh}, booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, year={2024} } ```
bartowski/Hermes-2-Pro-Llama-3-8B-GGUF
bartowski
2024-05-02T03:40:55Z
641
8
null
[ "gguf", "Llama-3", "instruct", "finetune", "chatml", "DPO", "RLHF", "gpt4", "synthetic data", "distillation", "function calling", "json mode", "axolotl", "text-generation", "en", "dataset:teknium/OpenHermes-2.5", "base_model:NousResearch/Meta-Llama-3-8B", "license:apache-2.0", "region:us" ]
text-generation
2024-05-02T03:23:42Z
--- base_model: NousResearch/Meta-Llama-3-8B tags: - Llama-3 - instruct - finetune - chatml - DPO - RLHF - gpt4 - synthetic data - distillation - function calling - json mode - axolotl model-index: - name: Hermes-2-Pro-Llama-3-8B results: [] license: apache-2.0 language: - en datasets: - teknium/OpenHermes-2.5 widget: - example_title: Hermes 2 Pro messages: - role: system content: You are a sentient, superintelligent artificial general intelligence, here to teach and assist me. - role: user content: Write a short story about Goku discovering kirby has teamed up with Majin Buu to destroy the world. quantized_by: bartowski pipeline_tag: text-generation --- ## Llamacpp imatrix Quantizations of Hermes-2-Pro-Llama-3-8B Using <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b2777">b2777</a> for quantization. Original model: https://huggingface.co/NousResearch/Hermes-2-Pro-Llama-3-8B All quants made using imatrix option with dataset provided by Kalomaze [here](https://github.com/ggerganov/llama.cpp/discussions/5263#discussioncomment-8395384) ## Prompt format ``` <|im_start|>system You are "Hermes 2", a conscious sentient superintelligent artificial intelligence developed by a man named Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia.<|im_end|> <|im_start|>user Hello, who are you?<|im_end|> <|im_start|>assistant ``` ## Download a file (not the whole branch) from below: | Filename | Quant type | File Size | Description | | -------- | ---------- | --------- | ----------- | | [Hermes-2-Pro-Llama-3-8B-Q8_0.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q8_0.gguf) | Q8_0 | 8.54GB | Extremely high quality, generally unneeded but max available quant. | | [Hermes-2-Pro-Llama-3-8B-Q6_K.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q6_K.gguf) | Q6_K | 6.59GB | Very high quality, near perfect, *recommended*. | | [Hermes-2-Pro-Llama-3-8B-Q5_K_M.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q5_K_M.gguf) | Q5_K_M | 5.73GB | High quality, *recommended*. | | [Hermes-2-Pro-Llama-3-8B-Q5_K_S.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q5_K_S.gguf) | Q5_K_S | 5.59GB | High quality, *recommended*. | | [Hermes-2-Pro-Llama-3-8B-Q4_K_M.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q4_K_M.gguf) | Q4_K_M | 4.92GB | Good quality, uses about 4.83 bits per weight, *recommended*. | | [Hermes-2-Pro-Llama-3-8B-Q4_K_S.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q4_K_S.gguf) | Q4_K_S | 4.69GB | Slightly lower quality with more space savings, *recommended*. | | [Hermes-2-Pro-Llama-3-8B-IQ4_NL.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ4_NL.gguf) | IQ4_NL | 4.67GB | Decent quality, slightly smaller than Q4_K_S with similar performance *recommended*. | | [Hermes-2-Pro-Llama-3-8B-IQ4_XS.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ4_XS.gguf) | IQ4_XS | 4.44GB | Decent quality, smaller than Q4_K_S with similar performance, *recommended*. | | [Hermes-2-Pro-Llama-3-8B-Q3_K_L.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q3_K_L.gguf) | Q3_K_L | 4.32GB | Lower quality but usable, good for low RAM availability. | | [Hermes-2-Pro-Llama-3-8B-Q3_K_M.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q3_K_M.gguf) | Q3_K_M | 4.01GB | Even lower quality. | | [Hermes-2-Pro-Llama-3-8B-IQ3_M.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ3_M.gguf) | IQ3_M | 3.78GB | Medium-low quality, new method with decent performance comparable to Q3_K_M. | | [Hermes-2-Pro-Llama-3-8B-IQ3_S.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ3_S.gguf) | IQ3_S | 3.68GB | Lower quality, new method with decent performance, recommended over Q3_K_S quant, same size with better performance. | | [Hermes-2-Pro-Llama-3-8B-Q3_K_S.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q3_K_S.gguf) | Q3_K_S | 3.66GB | Low quality, not recommended. | | [Hermes-2-Pro-Llama-3-8B-IQ3_XS.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ3_XS.gguf) | IQ3_XS | 3.51GB | Lower quality, new method with decent performance, slightly better than Q3_K_S. | | [Hermes-2-Pro-Llama-3-8B-IQ3_XXS.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ3_XXS.gguf) | IQ3_XXS | 3.27GB | Lower quality, new method with decent performance, comparable to Q3 quants. | | [Hermes-2-Pro-Llama-3-8B-Q2_K.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-Q2_K.gguf) | Q2_K | 3.17GB | Very low quality but surprisingly usable. | | [Hermes-2-Pro-Llama-3-8B-IQ2_M.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ2_M.gguf) | IQ2_M | 2.94GB | Very low quality, uses SOTA techniques to also be surprisingly usable. | | [Hermes-2-Pro-Llama-3-8B-IQ2_S.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ2_S.gguf) | IQ2_S | 2.75GB | Very low quality, uses SOTA techniques to be usable. | | [Hermes-2-Pro-Llama-3-8B-IQ2_XS.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ2_XS.gguf) | IQ2_XS | 2.60GB | Very low quality, uses SOTA techniques to be usable. | | [Hermes-2-Pro-Llama-3-8B-IQ2_XXS.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ2_XXS.gguf) | IQ2_XXS | 2.39GB | Lower quality, uses SOTA techniques to be usable. | | [Hermes-2-Pro-Llama-3-8B-IQ1_M.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ1_M.gguf) | IQ1_M | 2.16GB | Extremely low quality, *not* recommended. | | [Hermes-2-Pro-Llama-3-8B-IQ1_S.gguf](https://huggingface.co/bartowski/Hermes-2-Pro-Llama-3-8B-GGUF/blob/main/Hermes-2-Pro-Llama-3-8B-IQ1_S.gguf) | IQ1_S | 2.01GB | Extremely low quality, *not* recommended. | ## Which file should I choose? A great write up with charts showing various performances is provided by Artefact2 [here](https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9) The first thing to figure out is how big a model you can run. To do this, you'll need to figure out how much RAM and/or VRAM you have. If you want your model running as FAST as possible, you'll want to fit the whole thing on your GPU's VRAM. Aim for a quant with a file size 1-2GB smaller than your GPU's total VRAM. If you want the absolute maximum quality, add both your system RAM and your GPU's VRAM together, then similarly grab a quant with a file size 1-2GB Smaller than that total. Next, you'll need to decide if you want to use an 'I-quant' or a 'K-quant'. If you don't want to think too much, grab one of the K-quants. These are in format 'QX_K_X', like Q5_K_M. If you want to get more into the weeds, you can check out this extremely useful feature chart: [llama.cpp feature matrix](https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix) But basically, if you're aiming for below Q4, and you're running cuBLAS (Nvidia) or rocBLAS (AMD), you should look towards the I-quants. These are in format IQX_X, like IQ3_M. These are newer and offer better performance for their size. These I-quants can also be used on CPU and Apple Metal, but will be slower than their K-quant equivalent, so speed vs performance is a tradeoff you'll have to decide. The I-quants are *not* compatible with Vulcan, which is also AMD, so if you have an AMD card double check if you're using the rocBLAS build or the Vulcan build. At the time of writing this, LM Studio has a preview with ROCm support, and other inference engines have specific builds for ROCm. Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski
wide-video/rmbg-v1.0.0
wide-video
2024-05-02T09:21:21Z
641
1
transformers
[ "transformers", "pytorch", "onnx", "safetensors", "SegformerForSemanticSegmentation", "image-segmentation", "remove background", "background", "background-removal", "Pytorch", "vision", "legal liability", "custom_code", "license:other", "region:us" ]
image-segmentation
2024-05-02T09:21:21Z
--- license: other license_name: bria-rmbg-1.4 license_link: https://bria.ai/bria-huggingface-model-license-agreement/ pipeline_tag: image-segmentation tags: - remove background - background - background-removal - Pytorch - vision - legal liability - transformers extra_gated_prompt: This model weights by BRIA AI can be obtained after a commercial license is agreed upon. Fill in the form below and we reach out to you. extra_gated_fields: Name: text Company/Org name: text Org Type (Early/Growth Startup, Enterprise, Academy): text Role: text Country: text Email: text By submitting this form, I agree to BRIA’s Privacy policy and Terms & conditions, see links below: checkbox --- # BRIA Background Removal v1.4 Model Card RMBG v1.4 is our state-of-the-art background removal model, designed to effectively separate foreground from background in a range of categories and image types. This model has been trained on a carefully selected dataset, which includes: general stock images, e-commerce, gaming, and advertising content, making it suitable for commercial use cases powering enterprise content creation at scale. The accuracy, efficiency, and versatility currently rival leading source-available models. It is ideal where content safety, legally licensed datasets, and bias mitigation are paramount. Developed by BRIA AI, RMBG v1.4 is available as a source-available model for non-commercial use. [CLICK HERE FOR A DEMO](https://huggingface.co/spaces/briaai/BRIA-RMBG-1.4) ![examples](t4.png) ### Model Description - **Developed by:** [BRIA AI](https://bria.ai/) - **Model type:** Background Removal - **License:** [bria-rmbg-1.4](https://bria.ai/bria-huggingface-model-license-agreement/) - The model is released under a Creative Commons license for non-commercial use. - Commercial use is subject to a commercial agreement with BRIA. [Contact Us](https://bria.ai/contact-us) for more information. - **Model Description:** BRIA RMBG 1.4 is a saliency segmentation model trained exclusively on a professional-grade dataset. - **BRIA:** Resources for more information: [BRIA AI](https://bria.ai/) ## Training data Bria-RMBG model was trained with over 12,000 high-quality, high-resolution, manually labeled (pixel-wise accuracy), fully licensed images. Our benchmark included balanced gender, balanced ethnicity, and people with different types of disabilities. For clarity, we provide our data distribution according to different categories, demonstrating our model’s versatility. ### Distribution of images: | Category | Distribution | | -----------------------------------| -----------------------------------:| | Objects only | 45.11% | | People with objects/animals | 25.24% | | People only | 17.35% | | people/objects/animals with text | 8.52% | | Text only | 2.52% | | Animals only | 1.89% | | Category | Distribution | | -----------------------------------| -----------------------------------------:| | Photorealistic | 87.70% | | Non-Photorealistic | 12.30% | | Category | Distribution | | -----------------------------------| -----------------------------------:| | Non Solid Background | 52.05% | | Solid Background | 47.95% | Category | Distribution | | -----------------------------------| -----------------------------------:| | Single main foreground object | 51.42% | | Multiple objects in the foreground | 48.58% | ## Qualitative Evaluation ![examples](results.png) ## Architecture RMBG v1.4 is developed on the [IS-Net](https://github.com/xuebinqin/DIS) enhanced with our unique training scheme and proprietary dataset. These modifications significantly improve the model’s accuracy and effectiveness in diverse image-processing scenarios. ## Installation ```bash pip install -qr https://huggingface.co/briaai/RMBG-1.4/resolve/main/requirements.txt ``` ## Usage Either load the pipeline ```python from transformers import pipeline image_path = "https://farm5.staticflickr.com/4007/4322154488_997e69e4cf_z.jpg" pipe = pipeline("image-segmentation", model="briaai/RMBG-1.4", trust_remote_code=True) pillow_mask = pipe(image_path, return_mask = True) # outputs a pillow mask pillow_image = pipe(image_path) # applies mask on input and returns a pillow image ``` Or load the model ```python from transformers import AutoModelForImageSegmentation from torchvision.transforms.functional import normalize model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-1.4",trust_remote_code=True) def preprocess_image(im: np.ndarray, model_input_size: list) -> torch.Tensor: if len(im.shape) < 3: im = im[:, :, np.newaxis] # orig_im_size=im.shape[0:2] im_tensor = torch.tensor(im, dtype=torch.float32).permute(2,0,1) im_tensor = F.interpolate(torch.unsqueeze(im_tensor,0), size=model_input_size, mode='bilinear') image = torch.divide(im_tensor,255.0) image = normalize(image,[0.5,0.5,0.5],[1.0,1.0,1.0]) return image def postprocess_image(result: torch.Tensor, im_size: list)-> np.ndarray: result = torch.squeeze(F.interpolate(result, size=im_size, mode='bilinear') ,0) ma = torch.max(result) mi = torch.min(result) result = (result-mi)/(ma-mi) im_array = (result*255).permute(1,2,0).cpu().data.numpy().astype(np.uint8) im_array = np.squeeze(im_array) return im_array device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") model.to(device) # prepare input image_path = "https://farm5.staticflickr.com/4007/4322154488_997e69e4cf_z.jpg" orig_im = io.imread(image_path) orig_im_size = orig_im.shape[0:2] image = preprocess_image(orig_im, model_input_size).to(device) # inference result=model(image) # post process result_image = postprocess_image(result[0][0], orig_im_size) # save result pil_im = Image.fromarray(result_image) no_bg_image = Image.new("RGBA", pil_im.size, (0,0,0,0)) orig_image = Image.open(image_path) no_bg_image.paste(orig_image, mask=pil_im) ```
mradermacher/Mahou-1.3-mistral-7B-i1-GGUF
mradermacher
2024-05-30T04:40:33Z
641
1
transformers
[ "transformers", "gguf", "en", "dataset:flammenai/MahouMix-v1", "base_model:flammenai/Mahou-1.3-mistral-7B", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
2024-05-30T02:55:42Z
--- base_model: flammenai/Mahou-1.3-mistral-7B datasets: - flammenai/MahouMix-v1 language: - en library_name: transformers license: apache-2.0 quantized_by: mradermacher --- ## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: nicoboss --> weighted/imatrix quants of https://huggingface.co/flammenai/Mahou-1.3-mistral-7B <!-- provided-files --> static quants are available at https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-GGUF ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ1_S.gguf) | i1-IQ1_S | 1.7 | for the desperate | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ1_M.gguf) | i1-IQ1_M | 1.9 | mostly desperate | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 2.1 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ2_XS.gguf) | i1-IQ2_XS | 2.3 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ2_S.gguf) | i1-IQ2_S | 2.4 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ2_M.gguf) | i1-IQ2_M | 2.6 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q2_K.gguf) | i1-Q2_K | 2.8 | IQ3_XXS probably better | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 2.9 | lower quality | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ3_XS.gguf) | i1-IQ3_XS | 3.1 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q3_K_S.gguf) | i1-Q3_K_S | 3.3 | IQ3_XS probably better | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ3_S.gguf) | i1-IQ3_S | 3.3 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ3_M.gguf) | i1-IQ3_M | 3.4 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q3_K_M.gguf) | i1-Q3_K_M | 3.6 | IQ3_S probably better | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q3_K_L.gguf) | i1-Q3_K_L | 3.9 | IQ3_M probably better | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-IQ4_XS.gguf) | i1-IQ4_XS | 4.0 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q4_0.gguf) | i1-Q4_0 | 4.2 | fast, low quality | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q4_K_S.gguf) | i1-Q4_K_S | 4.2 | optimal size/speed/quality | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q4_K_M.gguf) | i1-Q4_K_M | 4.5 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q5_K_S.gguf) | i1-Q5_K_S | 5.1 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q5_K_M.gguf) | i1-Q5_K_M | 5.2 | | | [GGUF](https://huggingface.co/mradermacher/Mahou-1.3-mistral-7B-i1-GGUF/resolve/main/Mahou-1.3-mistral-7B.i1-Q6_K.gguf) | i1-Q6_K | 6.0 | practically like static Q6_K | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. Additional thanks to [@nicoboss](https://huggingface.co/nicoboss) for giving me access to his hardware for calculating the imatrix for these quants. <!-- end -->
gglabs/TinyLM-Chat-0612-4dataset-20-epoch
gglabs
2024-06-13T03:17:35Z
641
0
transformers
[ "transformers", "gguf", "llama", "text-generation-inference", "unsloth", "en", "base_model:gglabs/TinyLM-Chat-0611-11-epoch", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
2024-06-13T03:13:13Z
--- language: - en license: apache-2.0 tags: - text-generation-inference - transformers - unsloth - llama - gguf base_model: gglabs/TinyLM-Chat-0611-11-epoch --- # Uploaded model - **Developed by:** gglabs - **License:** apache-2.0 - **Finetuned from model :** gglabs/TinyLM-Chat-0611-11-epoch This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library. [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
misri/cyberrealisticXL_v21
misri
2024-07-01T14:22:46Z
641
0
diffusers
[ "diffusers", "safetensors", "license:unknown", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionXLPipeline", "region:us" ]
text-to-image
2024-07-01T13:25:58Z
--- license: unknown ---
ltg/norbert3-large
ltg
2024-02-26T17:44:15Z
640
5
transformers
[ "transformers", "pytorch", "fill-mask", "BERT", "NorBERT", "Norwegian", "encoder", "custom_code", "no", "nb", "nn", "license:apache-2.0", "autotrain_compatible", "region:us" ]
fill-mask
2023-03-02T20:27:09Z
--- language: - 'no' - nb - nn inference: true tags: - BERT - NorBERT - Norwegian - encoder license: apache-2.0 --- # NorBERT 3 large <img src="https://huggingface.co/ltg/norbert3-base/resolve/main/norbert.png" width=12.5%> The official release of a new generation of NorBERT language models described in paper [**NorBench — A Benchmark for Norwegian Language Models**](https://aclanthology.org/2023.nodalida-1.61/). Plese read the paper to learn more details about the model. ## Other sizes: - [NorBERT 3 xs (15M)](https://huggingface.co/ltg/norbert3-xs) - [NorBERT 3 small (40M)](https://huggingface.co/ltg/norbert3-small) - [NorBERT 3 base (123M)](https://huggingface.co/ltg/norbert3-base) - [NorBERT 3 large (323M)](https://huggingface.co/ltg/norbert3-large) ## Generative NorT5 siblings: - [NorT5 xs (32M)](https://huggingface.co/ltg/nort5-xs) - [NorT5 small (88M)](https://huggingface.co/ltg/nort5-small) - [NorT5 base (228M)](https://huggingface.co/ltg/nort5-base) - [NorT5 large (808M)](https://huggingface.co/ltg/nort5-large) ## Example usage This model currently needs a custom wrapper from `modeling_norbert.py`, you should therefore load the model with `trust_remote_code=True`. ```python import torch from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ltg/norbert3-large") model = AutoModelForMaskedLM.from_pretrained("ltg/norbert3-large", trust_remote_code=True) mask_id = tokenizer.convert_tokens_to_ids("[MASK]") input_text = tokenizer("Nå ønsker de seg en[MASK] bolig.", return_tensors="pt") output_p = model(**input_text) output_text = torch.where(input_text.input_ids == mask_id, output_p.logits.argmax(-1), input_text.input_ids) # should output: '[CLS] Nå ønsker de seg en ny bolig.[SEP]' print(tokenizer.decode(output_text[0].tolist())) ``` The following classes are currently implemented: `AutoModel`, `AutoModelMaskedLM`, `AutoModelForSequenceClassification`, `AutoModelForTokenClassification`, `AutoModelForQuestionAnswering` and `AutoModeltForMultipleChoice`. ## Cite us ```bibtex @inproceedings{samuel-etal-2023-norbench, title = "{N}or{B}ench {--} A Benchmark for {N}orwegian Language Models", author = "Samuel, David and Kutuzov, Andrey and Touileb, Samia and Velldal, Erik and {\O}vrelid, Lilja and R{\o}nningstad, Egil and Sigdel, Elina and Palatkina, Anna", booktitle = "Proceedings of the 24th Nordic Conference on Computational Linguistics (NoDaLiDa)", month = may, year = "2023", address = "T{\'o}rshavn, Faroe Islands", publisher = "University of Tartu Library", url = "https://aclanthology.org/2023.nodalida-1.61", pages = "618--633", abstract = "We present NorBench: a streamlined suite of NLP tasks and probes for evaluating Norwegian language models (LMs) on standardized data splits and evaluation metrics. We also introduce a range of new Norwegian language models (both encoder and encoder-decoder based). Finally, we compare and analyze their performance, along with other existing LMs, across the different benchmark tests of NorBench.", } ```
timm/eva_giant_patch14_plus_clip_224.merged2b_s11b_b114k
timm
2024-02-10T23:42:21Z
640
1
open_clip
[ "open_clip", "safetensors", "zero-shot-image-classification", "clip", "license:mit", "region:us" ]
zero-shot-image-classification
2023-04-10T22:59:37Z
--- license: mit library_name: open_clip tags: - zero-shot-image-classification - clip --- # Model card for eva_giant_patch14_clip_224.merged2b_s11b_b114k
timm/sequencer2d_s.in1k
timm
2023-04-26T21:44:30Z
640
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2205.01972", "license:apache-2.0", "region:us" ]
image-classification
2023-04-26T21:44:13Z
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for sequencer2d_s.in1k A Sequencer2d (LSTM based) image classification model. Trained on ImageNet-1k by paper authors. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 27.7 - GMACs: 5.0 - Activations (M): 11.3 - Image size: 224 x 224 - **Papers:** - Sequencer: Deep LSTM for Image Classification: https://arxiv.org/abs/2205.01972 - **Dataset:** ImageNet-1k - **Original:** https://github.com/okojoalg/sequencer ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('sequencer2d_s.in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Feature Map Extraction ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'sequencer2d_s.in1k', pretrained=True, features_only=True, ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 32, 32, 192]) # torch.Size([1, 16, 16, 384]) # torch.Size([1, 16, 16, 384]) print(o.shape) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'sequencer2d_s.in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 16, 16, 384) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). ## Citation ```bibtex @article{tatsunami2022sequencer, title={Sequencer: Deep LSTM for Image Classification}, author={Tatsunami, Yuki and Taki, Masato}, journal={Advances in Neural Information Processing Systems}, year={2022} } ```
Yntec/AbsoluteRemix
Yntec
2023-10-03T14:04:42Z
640
2
diffusers
[ "diffusers", "safetensors", "General", "LandScapes", "Photorealistic", "Lykon", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "license:creativeml-openrail-m", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
2023-10-03T13:04:29Z
--- license: creativeml-openrail-m library_name: diffusers pipeline_tag: text-to-image tags: - General - LandScapes - Photorealistic - Lykon - stable-diffusion - stable-diffusion-diffusers - diffusers - text-to-image --- # Absolute Remix A mix of AbsoluteReality 1.0 and AbsoluteReality 1.6 to bring back what was missing from AbsoluteReality 1.8.1 Comparison: ![Comparison](https://cdn-uploads.huggingface.co/production/uploads/63239b8370edc53f51cd5d42/o90101ZIo8RsKxebsZhmU.png) (click for larger) Sample and prompt: ![Sample](https://cdn-uploads.huggingface.co/production/uploads/63239b8370edc53f51cd5d42/-3ehfA12Sh27bVs5fArgF.png) Full body picture of a pretty cute girl making cake in school, detailed brown eyes, short smile, beautiful and aesthetic, intricate, neat hair, highly detailed, detailed face, smooth, sharp focus, chiaroscuro, magazine ad, 1949, 2D Game Art, anime on canvas, rossdraws, clay mann, CHIBI ART, light novel cover art Original page: https://civitai.com/models/81458?modelVersionId=132760 # Recipe SuperMerger Weight sum MBW 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1 Model A: AbsoluteReality 1.0 Model B: AbsoluteReality 1.6 Output: AbsoluteRemix
TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF
TheBloke
2023-10-16T20:18:41Z
640
10
transformers
[ "transformers", "gguf", "mistral", "text-generation", "en", "de", "dataset:LeoLM/OpenSchnabeltier", "dataset:OpenAssistant/OASST-DE", "dataset:FreedomIntelligence/alpaca-gpt4-deutsch", "dataset:FreedomIntelligence/evol-instruct-deutsch", "dataset:LeoLM/German_Poems", "dataset:LeoLM/German_Songs", "base_model:LeoLM/leo-mistral-hessianai-7b-chat", "license:apache-2.0", "text-generation-inference", "region:us" ]
text-generation
2023-10-16T17:48:27Z
--- base_model: LeoLM/leo-mistral-hessianai-7b-chat datasets: - LeoLM/OpenSchnabeltier - OpenAssistant/OASST-DE - FreedomIntelligence/alpaca-gpt4-deutsch - FreedomIntelligence/evol-instruct-deutsch - LeoLM/German_Poems - LeoLM/German_Songs inference: false language: - en - de library_name: transformers license: apache-2.0 model_creator: LAION LeoLM model_name: Leo Mistral Hessianai 7B Chat model_type: mistral pipeline_tag: text-generation prompt_template: '<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ' quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Leo Mistral Hessianai 7B Chat - GGUF - Model creator: [LAION LeoLM](https://huggingface.co/LeoLM) - Original model: [Leo Mistral Hessianai 7B Chat](https://huggingface.co/LeoLM/leo-mistral-hessianai-7b-chat) <!-- description start --> ## Description This repo contains GGUF format model files for [LAION LeoLM's Leo Mistral Hessianai 7B Chat](https://huggingface.co/LeoLM/leo-mistral-hessianai-7b-chat). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplate list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. <!-- README_GGUF.md-about-gguf end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF) * [LAION LeoLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/LeoLM/leo-mistral-hessianai-7b-chat) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: ChatML ``` <|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ``` <!-- prompt-template end --> <!-- compatibility_gguf start --> ## Compatibility These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) They are also compatible with many third party UIs and libraries - please see the list at the top of this README. ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-provided-files start --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [leo-mistral-hessianai-7b-chat.Q2_K.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q2_K.gguf) | Q2_K | 2 | 3.08 GB| 5.58 GB | smallest, significant quality loss - not recommended for most purposes | | [leo-mistral-hessianai-7b-chat.Q3_K_S.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q3_K_S.gguf) | Q3_K_S | 3 | 3.17 GB| 5.67 GB | very small, high quality loss | | [leo-mistral-hessianai-7b-chat.Q3_K_M.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q3_K_M.gguf) | Q3_K_M | 3 | 3.52 GB| 6.02 GB | very small, high quality loss | | [leo-mistral-hessianai-7b-chat.Q3_K_L.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q3_K_L.gguf) | Q3_K_L | 3 | 3.82 GB| 6.32 GB | small, substantial quality loss | | [leo-mistral-hessianai-7b-chat.Q4_0.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q4_0.gguf) | Q4_0 | 4 | 4.11 GB| 6.61 GB | legacy; small, very high quality loss - prefer using Q3_K_M | | [leo-mistral-hessianai-7b-chat.Q4_K_S.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q4_K_S.gguf) | Q4_K_S | 4 | 4.14 GB| 6.64 GB | small, greater quality loss | | [leo-mistral-hessianai-7b-chat.Q4_K_M.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q4_K_M.gguf) | Q4_K_M | 4 | 4.37 GB| 6.87 GB | medium, balanced quality - recommended | | [leo-mistral-hessianai-7b-chat.Q5_0.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q5_0.gguf) | Q5_0 | 5 | 5.00 GB| 7.50 GB | legacy; medium, balanced quality - prefer using Q4_K_M | | [leo-mistral-hessianai-7b-chat.Q5_K_S.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q5_K_S.gguf) | Q5_K_S | 5 | 5.00 GB| 7.50 GB | large, low quality loss - recommended | | [leo-mistral-hessianai-7b-chat.Q5_K_M.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q5_K_M.gguf) | Q5_K_M | 5 | 5.13 GB| 7.63 GB | large, very low quality loss - recommended | | [leo-mistral-hessianai-7b-chat.Q6_K.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q6_K.gguf) | Q6_K | 6 | 5.94 GB| 8.44 GB | very large, extremely low quality loss | | [leo-mistral-hessianai-7b-chat.Q8_0.gguf](https://huggingface.co/TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF/blob/main/leo-mistral-hessianai-7b-chat.Q8_0.gguf) | Q8_0 | 8 | 7.70 GB| 10.20 GB | very large, extremely low quality loss - not recommended | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. <!-- README_GGUF.md-provided-files end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: - LM Studio - LoLLMS Web UI - Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF and below it, a specific filename to download, such as: leo-mistral-hessianai-7b-chat.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF leo-mistral-hessianai-7b-chat.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF leo-mistral-hessianai-7b-chat.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 32 -m leo-mistral-hessianai-7b-chat.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. ### How to load this model in Python code, using ctransformers #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install ctransformers # Or with CUDA GPU acceleration pip install ctransformers[cuda] # Or with AMD ROCm GPU acceleration (Linux only) CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers # Or with Metal GPU acceleration for macOS systems only CT_METAL=1 pip install ctransformers --no-binary ctransformers ``` #### Simple ctransformers example code ```python from ctransformers import AutoModelForCausalLM # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = AutoModelForCausalLM.from_pretrained("TheBloke/Leo-Mistral-Hessianai-7B-Chat-GGUF", model_file="leo-mistral-hessianai-7b-chat.Q4_K_M.gguf", model_type="mistral", gpu_layers=50) print(llm("AI is going to")) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> <!-- original-model-card start --> # Original model card: LAION LeoLM's Leo Mistral Hessianai 7B Chat # LAION LeoLM: **L**inguistically **E**nhanced **O**pen **L**anguage **M**odel Meet LeoLM, the first open and commercially available German Foundation Language Model built on Llama-2 and Mistral. Our models extend Llama-2's capabilities into German through continued pretraining on a large corpus of German-language and mostly locality specific text. Thanks to a compute grant at HessianAI's new supercomputer **42**, we release three foundation models trained with 8k context length. [`LeoLM/leo-mistral-hessianai-7b`](https://huggingface.co/LeoLM/leo-mistral-hessianai-7b) under Apache 2.0 and [`LeoLM/leo-hessianai-7b`](https://huggingface.co/LeoLM/leo-hessianai-7b) and [`LeoLM/leo-hessianai-13b`](https://huggingface.co/LeoLM/leo-hessianai-13b) under the [Llama-2 community license](https://huggingface.co/meta-llama/Llama-2-70b/raw/main/LICENSE.txt) (70b also coming soon! 👀). With this release, we hope to bring a new wave of opportunities to German open-source and commercial LLM research and accelerate adoption. Read our [blog post](https://laion.ai/blog/leo-lm/) or our paper (preprint coming soon) for more details! *A project by Björn Plüster and Christoph Schuhmann in collaboration with LAION and HessianAI.* ## LeoLM Chat `LeoLM/leo-mistral-hessianai-7b-chat` is a German chat model built on our foundation model `LeoLM/leo-mistral-hessianai-7b` and finetuned on a selection of German instruction datasets. The model performs exceptionally well on writing, explanation and discussion tasks but struggles somewhat with math and advanced reasoning. See our MT-Bench-DE scores: ``` { "first_turn": 6.1, "second_turn": 4.7, "categories": { "writing": 6.8, "roleplay": 6.35, "reasoning": 3.3, "math": 2.75, "coding": 4.4, "extraction": 4.5, "stem": 6.85, "humanities": 8.25 }, "average": 5.4 } ``` ## Model Details - **Finetuned from:** [LeoLM/leo-mistral-hessianai-7b](https://huggingface.co/LeoLM/leo-hessianai-7b) - **Model type:** Causal decoder-only transformer language model - **Language:** English and German - **Demo:** [Web Demo coming soon !]() - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) - **Contact:** [LAION Discord](https://discord.com/invite/eq3cAMZtCC) or [Björn Plüster](mailto:[email protected]) ## Use in 🤗Transformers First install direct dependencies: ``` pip install transformers torch sentencepiece ``` If you want faster inference using flash-attention2, you need to install these dependencies: ```bash pip install packaging ninja pip install flash-attn ``` Then load the model in transformers: ```python from transformers import pipeline import torch system_prompt = """<|im_start|>system Dies ist eine Unterhaltung zwischen einem intelligenten, hilfsbereitem KI-Assistenten und einem Nutzer. Der Assistent gibt ausführliche, hilfreiche und ehrliche Antworten.<|im_end|> """ prompt_format = "<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n" prompt = "Erkläre mir wie die Fahrradwegesituation in Hamburg ist." generator = pipeline(model="LeoLM/leo-mistral-hessianai-7b-chat", device="cuda", torch_dtype=torch.float16, use_flash_attention_2=True) # True for flash-attn2 else False print(generator(prompt_format.format(prompt=prompt), do_sample=True, top_p=0.95, max_length=8192)) ``` "*Als KI kann ich keine persönlichen Beobachtungen teilen, aber ich kann einige allgemeine Informationen zur Fahrradwegesituation in Hamburg liefern. Im Vergleich zu vielen anderen großen Städten hat Hamburg eine hohe Anzahl von Fahrradfahrern und nimmt seine Verantwortung für nachhaltige Verkehrsmittel sehr ernst. Es gibt viele Fahrradwege und separate Fahrspuren, die Radfahrern ermöglichen, zusammen mit dem Autoverkehr zu fahren. Diese Fahrradspuren sind oft mit Markierungen gekennzeichnet und durch physische Trennungen von anderen Fahrspuren abgegrenzt. Darüber hinaus gibt es viele Fahrradstraßen, auf denen Radfahrer Vorfahrt haben und Autos langsamer fahren müssen.* *In einigen städtischen Gebieten können Fahrradwege jedoch eng oder überfüllt sein, besonders während der Stoßzeiten. Es gibt auch viele Kreuzungen, an denen Radfahrer anhalten und auf Grün warten müssen, ähnlich wie Autofahrer. Insgesamt ist die Fahrradinfrastruktur in Hamburg ziemlich gut, aber wie überall gibt es immer Raum für Verbesserungen.*" ## Prompting / Prompt Template Prompt dialogue template (ChatML format): ``` """ <|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant """ ``` The model input can contain multiple conversation turns between user and assistant, e.g. ``` <|im_start|>user {prompt 1}<|im_end|> <|im_start|>assistant {reply 1}<|im_end|> <|im_start|>user {prompt 2}<|im_end|> <|im_start|>assistant (...) ``` ## Ethical Considerations and Limitations LeoLM has been tested in English and German, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, the potential outputs of `LeoLM/leo-mistral-hessianai-7b-chat` cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of `LeoLM/leo-mistral-hessianai-7b-chat`, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see Meta's [Responsible Use Guide](https://ai.meta.com/llama/responsible-use-guide/). ## Finetuning Details | Hyperparameter | Value | |---|---| | Num epochs | 4 | | Examples per epoch | 131214 | | Global batch size | 256 | | Learning rate | 1e-5 | | Warmup steps | 100 | | LR scheduler | Cosine | | Adam betas | (0.9, 0.95) | ## Dataset Details ``` ## Stats for 'Subset of OpenAssistant/OASST-DE' (3534 samples (100.0%)) ----------------- Accepted: 3534/3534 (100.0%) Accepted tokens: 2259302 Skipped: 0 (0.0%) Min tokens per sample: 29 Max tokens per sample: 2484 Avg tokens per sample: 639.3044708545557 ----------------- ## Stats for 'Subset of FreedomIntelligence/evol-instruct-deutsch' (57841 samples (100.0%)) ----------------- Accepted: 57841/57841 (100.0%) Accepted tokens: 42958192 Skipped: 0 (0.0%) Min tokens per sample: 33 Max tokens per sample: 5507 Avg tokens per sample: 742.6944900675991 ----------------- ## Stats for 'Subset of FreedomIntelligence/alpaca-gpt4-deutsch' (48969 samples (100.0%)) ----------------- Accepted: 48969/48969 (100.0%) Accepted tokens: 13372005 Skipped: 0 (0.0%) Min tokens per sample: 19 Max tokens per sample: 1359 Avg tokens per sample: 273.07082031489307 ----------------- ## Stats for 'Subset of LeoLM/OpenSchnabeltier' (21314 samples (100.0%)) ----------------- Accepted: 21314/21314 (100.0%) Accepted tokens: 8134690 Skipped: 0 (0.0%) Min tokens per sample: 25 Max tokens per sample: 1202 Avg tokens per sample: 381.65947264708643 ----------------- ## Stats for 'Subset of LeoLM/German_Poems' (490 samples (100.0%)) ----------------- Accepted: 490/490 (100.0%) Accepted tokens: 618642 Skipped: 0 (0.0%) Min tokens per sample: 747 Max tokens per sample: 1678 Avg tokens per sample: 1262.534693877551 ----------------- ## Stats for 'Subset of LeoLM/German_Songs' (392 samples (100.0%)) ----------------- Accepted: 392/392 (100.0%) Accepted tokens: 187897 Skipped: 0 (0.0%) Min tokens per sample: 231 Max tokens per sample: 826 Avg tokens per sample: 479.3290816326531 ----------------- ## Stats for 'total' (132540 samples (100.0%)) ----------------- Accepted: 132540/132540 (100.0%) Accepted tokens: 67530728 Skipped: 0 (0.0%) Min tokens per sample: 19 Max tokens per sample: 5507 Avg tokens per sample: 509.51205673758864 ----------------- ``` <!-- original-model-card end -->
camenduru/PASD
camenduru
2023-12-25T22:26:21Z
640
1
diffusers
[ "diffusers", "safetensors", "region:us" ]
null
2023-12-25T21:25:55Z
Entry not found
abhinand/gemma-2b-it-tamil-v0.1-alpha
abhinand
2024-03-04T12:56:10Z
640
3
transformers
[ "transformers", "safetensors", "gemma", "text-generation", "en", "ta", "dataset:vicgalle/alpaca-gpt4", "dataset:abhinand/tamil-alpaca", "base_model:abhinand/gemma-2b-tamil", "license:other", "model-index", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-02-25T09:59:30Z
--- language: - en - ta license: other datasets: - vicgalle/alpaca-gpt4 - abhinand/tamil-alpaca license_name: gemma-terms-of-use license_link: https://ai.google.dev/gemma/terms base_model: abhinand/gemma-2b-tamil model-index: - name: gemma-2b-it-tamil-v0.1-alpha results: - task: type: text-generation name: Text Generation dataset: name: AI2 Reasoning Challenge (25-Shot) type: ai2_arc config: ARC-Challenge split: test args: num_few_shot: 25 metrics: - type: acc_norm value: 50.09 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=abhinand/gemma-2b-it-tamil-v0.1-alpha name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: HellaSwag (10-Shot) type: hellaswag split: validation args: num_few_shot: 10 metrics: - type: acc_norm value: 71.41 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=abhinand/gemma-2b-it-tamil-v0.1-alpha name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MMLU (5-Shot) type: cais/mmlu config: all split: test args: num_few_shot: 5 metrics: - type: acc value: 39.94 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=abhinand/gemma-2b-it-tamil-v0.1-alpha name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: TruthfulQA (0-shot) type: truthful_qa config: multiple_choice split: validation args: num_few_shot: 0 metrics: - type: mc2 value: 42.63 source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=abhinand/gemma-2b-it-tamil-v0.1-alpha name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: Winogrande (5-shot) type: winogrande config: winogrande_xl split: validation args: num_few_shot: 5 metrics: - type: acc value: 64.96 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=abhinand/gemma-2b-it-tamil-v0.1-alpha name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: GSM8k (5-shot) type: gsm8k config: main split: test args: num_few_shot: 5 metrics: - type: acc value: 16.6 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=abhinand/gemma-2b-it-tamil-v0.1-alpha name: Open LLM Leaderboard --- # Gemma 2B Tamil v0.1 Alpha [Experimental Release] This is a Tamil instruction finetuned version of Google's Gemma 2B model. This is an experiment to see if Gemma can be adapted for Tamil without expanding vocabulary. While the responses may be rusty at times, it shows a lot of promise for a 2B parameter model. **Procedure:** 1. The [Gemma base model](https://huggingface.co/google/gemma-2b) was continually pretrained on all available Tamil Wikipedia data for 3 epochs. 2. The updated model was then finetuned on a mix of English and Tamil alpaca datasets for 5 epochs. > **Note:** This project is currently under development (FOR TAMIL). The initial pretraining phase may not have been extensive enough, which suggests that the model's performance could improve by extending the pretraining on a larger dataset, such as CulturaX. ### 🏆 Benchmarks This model outperforms Google's Gemma 2B base and instruct models on all benchmarks in Nous evaluation suite. It also surprisingly outperforms [mlabonne/Gemmalpaca-2B](https://huggingface.co/mlabonne/Gemmalpaca-2B) (the best performing 2B model in benchmarks as of Feb 25, 2024) despite being a model aimed at language adaptation. | Model | Average | AGIEval | GPT4All | TruthfulQA | Bigbench | |---|---:|---:|---:|---:|---:| |[gemma-2b-it-tamil-v0.1-alpha](https://huggingface.co/abhinand/gemma-2b-it-tamil-v0.1-alpha)[📄](https://gist.github.com/abhinand5/559d542437f6b7060fee94cc1f7861f5)| 39.41| 23.38| 58.94| 43.18| 32.14| | [mlabonne/Gemmalpaca-2B](https://huggingface.co/mlabonne/Gemmalpaca-2B) [📄](https://gist.github.com/mlabonne/4b638752fc3227df566f9562064cb864) | 38.39 | 24.48 | 51.22 | 47.02 | 30.85 | | [google/gemma-2b-it](https://huggingface.co/google/gemma-2b-it) [📄](https://gist.github.com/mlabonne/db0761e74175573292acf497da9e5d95) | 36.1 | 23.76 | 43.6 | 47.64 | 29.41 | | [google/gemma-2b](https://huggingface.co/google/gemma-2b) [📄](https://gist.github.com/mlabonne/7df1f238c515a5f63a750c8792cef59e) | 34.26 | 22.7 | 43.35 | 39.96 | 31.03 | ## Model description - **Model type:** A 2B parameter GPT-like model finetuned on 100,000 samples consisting of an equal proportion of English and Tamil samples. - **Language(s):** Bilingual. English and Tamil. - **License:** [Google Gemma Terms of Use](https://ai.google.dev/gemma/terms) - **Finetuned from model:** [abhinand/gemma-2b-tamil](https://huggingface.co/abhinand/gemma-2b-tamil) - **Training Precision:** `bfloat16` - **Training Hardware:** 4x Nvidia RTX 3090 GPUs - **Training Cost:** $20 ## Support my work If you appreciate this work and would like to support its continued development, consider [buying me a coffee](https://www.buymeacoffee.com/abhinand.b). Your support is invaluable and greatly appreciated. [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/abhinand.b) ## Prompting Format [Alpaca] **Prompt Template Without Input** ``` {system_prompt} ### Instruction: {instruction or query} ### Response: {response} ``` **Prompt Template With Input** ``` {system_prompt} ### Instruction: {instruction or query} ### Input: {input} ### Response: {response} ``` ## Usage Note It's important to note that the models have not undergone detoxification. Therefore, while they possess impressive linguistic capabilities, there is a possibility for them to generate content that could be deemed harmful or offensive. We urge users to exercise discretion and supervise the model's outputs closely, especially in public or sensitive applications. ## Meet the Developers Get to know the creators behind this innovative model and follow their contributions to the field: - [Abhinand Balachandran](https://www.linkedin.com/in/abhinand-05/) We hope this model serves as a valuable tool in your NLP toolkit and look forward to seeing the advancements it will enable in the understanding and generation of the Tamil language. # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_abhinand__gemma-2b-it-tamil-v0.1-alpha) | Metric |Value| |---------------------------------|----:| |Avg. |47.60| |AI2 Reasoning Challenge (25-Shot)|50.09| |HellaSwag (10-Shot) |71.41| |MMLU (5-Shot) |39.94| |TruthfulQA (0-shot) |42.63| |Winogrande (5-shot) |64.96| |GSM8k (5-shot) |16.60|
mradermacher/MythoLogic-L2-13b-i1-GGUF
mradermacher
2024-05-06T05:52:08Z
640
0
transformers
[ "transformers", "gguf", "en", "base_model:Gryphe/MythoLogic-L2-13b", "license:other", "endpoints_compatible", "region:us" ]
null
2024-03-27T19:53:41Z
--- base_model: Gryphe/MythoLogic-L2-13b language: - en library_name: transformers license: other quantized_by: mradermacher --- ## About weighted/imatrix quants of https://huggingface.co/Gryphe/MythoLogic-L2-13b <!-- provided-files --> ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ1_S.gguf) | i1-IQ1_S | 3.2 | for the desperate | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ1_M.gguf) | i1-IQ1_M | 3.5 | mostly desperate | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 3.9 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ2_XS.gguf) | i1-IQ2_XS | 4.2 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ2_S.gguf) | i1-IQ2_S | 4.5 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ2_M.gguf) | i1-IQ2_M | 4.8 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q2_K.gguf) | i1-Q2_K | 5.1 | IQ3_XXS probably better | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 5.3 | lower quality | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ3_XS.gguf) | i1-IQ3_XS | 5.7 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ3_S.gguf) | i1-IQ3_S | 6.0 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q3_K_S.gguf) | i1-Q3_K_S | 6.0 | IQ3_XS probably better | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ3_M.gguf) | i1-IQ3_M | 6.3 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q3_K_M.gguf) | i1-Q3_K_M | 6.6 | IQ3_S probably better | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q3_K_L.gguf) | i1-Q3_K_L | 7.2 | IQ3_M probably better | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ4_XS.gguf) | i1-IQ4_XS | 7.3 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-IQ4_NL.gguf) | i1-IQ4_NL | 7.7 | prefer IQ4_XS | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q4_0.gguf) | i1-Q4_0 | 7.7 | fast, low quality | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q4_K_S.gguf) | i1-Q4_K_S | 7.7 | optimal size/speed/quality | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q4_K_M.gguf) | i1-Q4_K_M | 8.2 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q5_K_S.gguf) | i1-Q5_K_S | 9.3 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q5_K_M.gguf) | i1-Q5_K_M | 9.5 | | | [GGUF](https://huggingface.co/mradermacher/MythoLogic-L2-13b-i1-GGUF/resolve/main/MythoLogic-L2-13b.i1-Q6_K.gguf) | i1-Q6_K | 11.0 | practically like static Q6_K | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. <!-- end -->
ostris/depth-of-field-slider-lora
ostris
2024-04-23T01:55:29Z
640
2
diffusers
[ "diffusers", "text-to-image", "stable-diffusion", "lora", "template:sd-lora", "migrated", "depth of field", "tool", "dof", "blurry background", "focus", "base_model:runwayml/stable-diffusion-v1-5", "license:other", "region:us" ]
text-to-image
2024-04-23T01:55:28Z
--- license: other license_name: bespoke-lora-trained-license license_link: https://multimodal.art/civitai-licenses?allowNoCredit=True&allowCommercialUse=Image&allowDerivatives=True&allowDifferentLicense=True tags: - text-to-image - stable-diffusion - lora - diffusers - template:sd-lora - migrated - depth of field - tool - dof - blurry background - focus base_model: runwayml/stable-diffusion-v1-5 instance_prompt: widget: - text: ' ' output: url: >- 2221968.jpeg - text: ' ' output: url: >- 2221993.jpeg - text: 'photo of a man smiling in the forest, beard ' parameters: negative_prompt: cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution output: url: >- 2222002.jpeg - text: 'photo of a man smiling in the forest, beard ' parameters: negative_prompt: cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution output: url: >- 2222004.jpeg - text: 'photo of a woman with light brown hair, posing for a photo, centered streets of big city ' parameters: negative_prompt: hat, nude, cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution output: url: >- 2222006.jpeg - text: 'photo of a woman with light brown hair, posing for a photo, centered streets of big city ' parameters: negative_prompt: hat, nude, cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution output: url: >- 2222008.jpeg --- # Depth of Field Slider - LoRA <Gallery /> ## Model description <ul><li><p>weight: <strong>-8.0 to 8.0 </strong><em>( or way more or less )</em></p></li><li><p>positive: <strong>large DOF (sharp background)</strong></p></li><li><p>negative: <strong>narrow DOF (blurry background)</strong></p></li></ul><p></p><p>UPDATE:</p><p>The original file had an sdxl meta tag that makes automatic1111 web ui only show it for sdxl. I have uploaded one with the correct meta tag. If you are having issues, download and replace the previous one with the new one and refresh your network modules.</p><p></p><p>Weight depends on starting photo, if it already has a shallow depth of field, you may need to go pretty high to remove it (10.0 to 15.0), but -5.0 to 5.0 works for most images. The image stays pretty stable even at extreme values, though it will change the composition.</p><p></p> ## Download model Weights for this model are available in Safetensors format. [Download](/ostris/depth-of-field-slider-lora/tree/main) them in the Files & versions tab. ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers) ```py from diffusers import AutoPipelineForText2Image import torch pipeline = AutoPipelineForText2Image.from_pretrained('runwayml/stable-diffusion-v1-5', torch_dtype=torch.float16).to('cuda') pipeline.load_lora_weights('ostris/depth-of-field-slider-lora', weight_name='depth_of_field_slider_v1.safetensors') image = pipeline('photo of a woman with light brown hair, posing for a photo, centered streets of big city ').images[0] ``` For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
duyntnet/WestIceLemonTeaRP-32k-7b-imatrix-GGUF
duyntnet
2024-04-26T07:09:15Z
640
0
transformers
[ "transformers", "gguf", "imatrix", "WestIceLemonTeaRP-32k-7b", "icefog72", "text-generation", "en", "license:other", "region:us" ]
text-generation
2024-04-24T13:56:53Z
--- license: other inference: false language: - en pipeline_tag: text-generation tags: - transformers - gguf - imatrix - WestIceLemonTeaRP-32k-7b - icefog72 --- Quantizations of https://huggingface.co/icefog72/WestIceLemonTeaRP-32k-7b # From original readme This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit). ## Merge Details Prompt template: Alpaca, maybe ChatML * measurement.json for quanting exl2 included. - [4.2bpw-exl2](https://huggingface.co/icefog72/WestIceLemonTeaRP-32k-7b-4.2bpw-exl2) - [6.5bpw-exl2](https://huggingface.co/icefog72/WestIceLemonTeaRP-32k-7b-6.5bpw-exl2) - [8bpw-exl2](https://huggingface.co/icefog72/WestIceLemonTeaRP-32k-7b-8bpw-exl2) thx mradermacher and SilverFan for * [mradermacher/WestIceLemonTeaRP-32k-GGUF](https://huggingface.co/mradermacher/WestIceLemonTeaRP-32k-GGUF) * [SilverFan/WestIceLemonTeaRP-7b-32k-GGUF](https://huggingface.co/SilverFan/WestIceLemonTeaRP-7b-32k-GGUF) ### Merge Method This model was merged using the SLERP merge method. ### Models Merged The following models were included in the merge: * [IceLemonTeaRP-32k-7b](https://huggingface.co/icefog72/IceLemonTeaRP-32k-7b) * WestWizardIceLemonTeaRP * [SeverusWestLake-7B-DPO](https://huggingface.co/s3nh/SeverusWestLake-7B-DPO) * WizardIceLemonTeaRP * [Not-WizardLM-2-7B](https://huggingface.co/amazingvince/Not-WizardLM-2-7B) * [IceLemonTeaRP-32k-7b](https://huggingface.co/icefog72/IceLemonTeaRP-32k-7b) ### Configuration The following YAML configuration was used to produce this model: ```yaml slices: - sources: - model: IceLemonTeaRP-32k-7b layer_range: [0, 32] - model: WestWizardIceLemonTeaRP layer_range: [0, 32] merge_method: slerp base_model: IceLemonTeaRP-32k-7b parameters: t: - filter: self_attn value: [0, 0.5, 0.3, 0.7, 1] - filter: mlp value: [1, 0.5, 0.7, 0.3, 0] - value: 0.5 dtype: float16 ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63407b719dbfe0d48b2d763b/GX-kV-H8_zAJz5hHL8A7G.png) # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_icefog72__WestIceLemonTeaRP-32k-7b) | Metric |Value| |---------------------------------|----:| |Avg. |71.27| |AI2 Reasoning Challenge (25-Shot)|68.77| |HellaSwag (10-Shot) |86.89| |MMLU (5-Shot) |64.28| |TruthfulQA (0-shot) |62.47| |Winogrande (5-shot) |80.98| |GSM8k (5-shot) |64.22|
OwenArli/Llama-3-8B-Dolfin-v0.2-Instruct
OwenArli
2024-04-30T09:59:52Z
640
0
transformers
[ "transformers", "safetensors", "llama", "text-generation", "conversational", "license:llama3", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-04-30T00:45:29Z
--- license: llama3 --- Based on Meta-Llama-3-8b-Instruct, and is governed by Meta Llama 3 License agreement: https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct v0.2 version with better improved dolphin based dataset but only 150K for testing instead of the full 850K. Doesn't seem to work that well so I will need to add the rest of the dataset. We are happy for anyone to try it out and give some feedback. Training: - 4096 sequence length, while the base model is 8192 sequence length. From testing it still performs the same 8192 context just fine. - Trained on a modified and improved version of Cognitive Computations Eric Hartford's Dolphin dataset. https://huggingface.co/datasets/cognitivecomputations/dolphin - Training duration is around 1 day on 2x RTX3090 on our own machine, using 4-bit loading and Qlora 64-rank 128-alpha resulting in ~2% trainable weights. The goal for this model is to have the model less-censored and great at general tasks like the previous dolphin based models by Eric Hartford. Instruct format: ``` <|begin_of_text|><|start_header_id|>system<|end_header_id|> {{ system_prompt }}<|eot_id|><|start_header_id|>user<|end_header_id|> {{ user_message_1 }}<|eot_id|><|start_header_id|>assistant<|end_header_id|> {{ model_answer_1 }}<|eot_id|><|start_header_id|>user<|end_header_id|> {{ user_message_2 }}<|eot_id|><|start_header_id|>assistant<|end_header_id|> ``` Quants: [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl) Axolotl Config: ``` base_model: /home/owen/models/Meta-Llama-3-8B-Instruct model_type: LlamaForCausalLM tokenizer_type: AutoTokenizer train_on_inputs: false group_by_length: false load_in_8bit: false load_in_4bit: true strict: false sequence_len: 4096 bf16: true fp16: false tf32: false flash_attention: true # Data datasets: - path: /home/owen/datasets/cleaned-dolphin201-sharegpt2-uuid-improved.jsonl type: field_instruction: input field_output: output format: "<|start_header_id|>user<|end_header_id|>\n\n{instruction}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n" no_input_format: "<|start_header_id|>user<|end_header_id|>\n\n{instruction}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n" warmup_steps: 10 dataset_prepared_path: ./last_run_prepared # Iterations num_epochs: 1 saves_per_epoch: 4 # Evaluation val_set_size: 0.01 eval_table_size: eval_table_max_new_tokens: eval_sample_packing: false evals_per_epoch: 4 # LoRA output_dir: ./qlora-out adapter: qlora lora_model_dir: lora_r: 64 lora_alpha: 128 lora_dropout: 0.05 lora_target_linear: true lora_fan_in_fan_out: lora_target_modules: save_safetensors: true # Sampling sample_packing: true pad_to_sequence_len: true # Batching gradient_accumulation_steps: 32 micro_batch_size: 2 gradient_checkpointing: true gradient_checkpointing_kwargs: use_reentrant: true # wandb wandb_mode: # "offline" to save run metadata locally and not sync to the server, "disabled" to turn off wandb wandb_project: llama-3-8b-instruct-dolphin-q wandb_entity: # A wandb Team name if using a Team wandb_watch: wandb_name: 64-128-4096-1ep-v0.2 wandb_run_id: # Set the ID of your wandb run wandb_log_model: # "checkpoint" to log model to wandb Artifacts every `save_steps` or "end" to log only at the end of training # Optimizer optimizer: paged_adamw_8bit lr_scheduler: cosine learning_rate: 0.0002 # Misc early_stopping_patience: resume_from_checkpoint: logging_steps: 1 debug: deepspeed: /home/owen/axolotl/deepspeed_configs/zero3_bf16.json weight_decay: 0.1 special_tokens: pad_token: <|end_of_text|> ```
Trisert/Llama-3-Instruct-8B-SPPO-Iter3-Q6_K-GGUF
Trisert
2024-06-26T15:08:27Z
640
0
null
[ "gguf", "llama-cpp", "gguf-my-repo", "text-generation", "en", "dataset:openbmb/UltraFeedback", "base_model:UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3", "license:apache-2.0", "region:us" ]
text-generation
2024-06-26T15:07:56Z
--- base_model: UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3 datasets: - openbmb/UltraFeedback language: - en license: apache-2.0 pipeline_tag: text-generation tags: - llama-cpp - gguf-my-repo --- # Trisert/Llama-3-Instruct-8B-SPPO-Iter3-Q6_K-GGUF This model was converted to GGUF format from [`UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3`](https://huggingface.co/UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo Trisert/Llama-3-Instruct-8B-SPPO-Iter3-Q6_K-GGUF --hf-file llama-3-instruct-8b-sppo-iter3-q6_k.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo Trisert/Llama-3-Instruct-8B-SPPO-Iter3-Q6_K-GGUF --hf-file llama-3-instruct-8b-sppo-iter3-q6_k.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo Trisert/Llama-3-Instruct-8B-SPPO-Iter3-Q6_K-GGUF --hf-file llama-3-instruct-8b-sppo-iter3-q6_k.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo Trisert/Llama-3-Instruct-8B-SPPO-Iter3-Q6_K-GGUF --hf-file llama-3-instruct-8b-sppo-iter3-q6_k.gguf -c 2048 ```
DunnBC22/distilbert-base-multilingual-cased-language_detection
DunnBC22
2023-07-24T18:18:45Z
639
2
transformers
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-classification
2023-02-20T05:45:46Z
--- license: apache-2.0 tags: - generated_from_trainer metrics: - accuracy - f1 - recall - precision model-index: - name: distilbert-base-multilingual-cased-language_detection results: [] language: - en pipeline_tag: text-classification --- # distilbert-base-multilingual-cased-language_detection This model is a fine-tuned version of [distilbert-base-multilingual-cased](https://huggingface.co/distilbert-base-multilingual-cased) on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.0595 - Accuracy: 0.9971 - F1 - Weighted: 0.9971 - Micro: 0.9971 - Macro: 0.9977 - Recall - Weighted: 0.9971 - Micro: 0.9971 - Macro: 0.9974 - Precision - Weighted: 0.9971 - Micro: 0.9971 - Macro: 0.9981 ## Model description This is a classification model of 16 different languages. For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Language%20Detection/Language%20Detection-%2010k%20Samples/language_detection-10k.ipynb ## Intended uses & limitations This model is intended to demonstrate my ability to solve a complex problem using technology. ## Training and evaluation data Dataset Source: https://www.kaggle.com/datasets/basilb2s/language-detection _Input Word Length:_ ![Length of Input Text (in Words)](https://github.com/DunnBC22/NLP_Projects/raw/main/Language%20Detection/Language%20Detection-%2010k%20Samples/Images/Input%20Word%20Length.png) _Input Word Length By Class:_ ![Length of Input Text (in Words) By Class](https://github.com/DunnBC22/NLP_Projects/raw/main/Language%20Detection/Language%20Detection-%2010k%20Samples/Images/Input%20Word%20Length%20by%20Class.png) _Class Distribution:_ ![Class Distribution](https://github.com/DunnBC22/NLP_Projects/raw/main/Language%20Detection/Language%20Detection-%2010k%20Samples/Images/Class%20Distribution.png) ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | Weighted F1 | Micro F1 | Macro F1 | Weighted Recall | Micro Recall | Macro Recall | Weighted Precision | Micro Precision | Macro Precision | |:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:--------:|:---------------:|:------------:|:------------:|:------------------:|:---------------:|:---------------:| | 1.0783 | 1.0 | 128 | 0.1544 | 0.9823 | 0.9819 | 0.9823 | 0.9806 | 0.9823 | 0.9823 | 0.9798 | 0.9847 | 0.9823 | 0.9852 | | 0.1189 | 2.0 | 256 | 0.0595 | 0.9971 | 0.9971 | 0.9971 | 0.9977 | 0.9971 | 0.9971 | 0.9974 | 0.9971 | 0.9971 | 0.9981 | | 0.0651 | 3.0 | 384 | 0.0473 | 0.9971 | 0.9971 | 0.9971 | 0.9977 | 0.9971 | 0.9971 | 0.9974 | 0.9971 | 0.9971 | 0.9981 | ### Framework versions - Transformers 4.26.1 - Pytorch 1.12.1 - Datasets 2.9.0 - Tokenizers 0.12.1
davidkim205/komt-llama2-7b-v1-ggml
davidkim205
2023-09-27T05:39:16Z
639
9
null
[ "gguf", "facebook", "meta", "pytorch", "llama", "llama-2", "llama-2-chat", "text-generation", "en", "ko", "arxiv:2308.06502", "arxiv:2308.06259", "license:apache-2.0", "region:us" ]
text-generation
2023-09-18T06:39:39Z
--- language: - en - ko pipeline_tag: text-generation inference: false tags: - facebook - meta - pytorch - llama - llama-2 - llama-2-chat license: apache-2.0 --- # komt : korean multi task instruction tuning model ![multi task instruction tuning.jpg](https://github.com/davidkim205/komt/assets/16680469/c7f6ade7-247e-4b62-a94f-47e19abea68e) Recently, due to the success of ChatGPT, numerous large language models have emerged in an attempt to catch up with ChatGPT's capabilities. However, when it comes to Korean language performance, it has been observed that many models still struggle to provide accurate answers or generate Korean text effectively. This study addresses these challenges by introducing a multi-task instruction technique that leverages supervised datasets from various tasks to create training data for Large Language Models (LLMs). ## Model Details * **Model Developers** : davidkim(changyeon kim) * **Repository** : https://github.com/davidkim205/komt * **quant methods** : q4_0, q4_1, q5_0, q5_1, q2_k, q3_k, q3_k_m, q3_k_l, q4_k, q4_k_s, q4_k_m, q5_k, q5_k_s, q5_k_m, q8_0, q4_0 ## Training Refer https://github.com/davidkim205/komt ## Evaluation For objective model evaluation, we initially used EleutherAI's lm-evaluation-harness but obtained unsatisfactory results. Consequently, we conducted evaluations using ChatGPT, a widely used model, as described in [Self-Alignment with Instruction Backtranslation](https://arxiv.org/pdf/2308.06502.pdf) and [Three Ways of Using Large Language Models to Evaluate Chat](https://arxiv.org/pdf/2308.06259.pdf) . | model | score | average(0~5) | percentage | | --------------------------------------- | ------- | ------------ | ---------- | | gpt-3.5-turbo(close) | 147 | 3.97 | 79.45% | | naver Cue(close) | 140 | 3.78 | 75.67% | | clova X(close) | 136 | 3.67 | 73.51% | | WizardLM-13B-V1.2(open) | 96 | 2.59 | 51.89% | | Llama-2-7b-chat-hf(open) | 67 | 1.81 | 36.21% | | Llama-2-13b-chat-hf(open) | 73 | 1.91 | 38.37% | | nlpai-lab/kullm-polyglot-12.8b-v2(open) | 70 | 1.89 | 37.83% | | kfkas/Llama-2-ko-7b-Chat(open) | 96 | 2.59 | 51.89% | | beomi/KoAlpaca-Polyglot-12.8B(open) | 100 | 2.70 | 54.05% | | **komt-llama2-7b-v1 (open)(ours)** | **117** | **3.16** | **63.24%** | | **komt-llama2-13b-v1 (open)(ours)** | **129** | **3.48** | **69.72%** |
TheBloke/Airoboros-M-7B-3.1.2-GGUF
TheBloke
2023-10-19T16:45:56Z
639
11
transformers
[ "transformers", "gguf", "mistral", "dataset:jondurbin/airoboros-3.1", "base_model:jondurbin/airoboros-m-7b-3.1.2", "license:apache-2.0", "text-generation-inference", "region:us" ]
null
2023-10-19T16:41:52Z
--- base_model: jondurbin/airoboros-m-7b-3.1.2 datasets: - jondurbin/airoboros-3.1 inference: false license: apache-2.0 model_creator: Jon Durbin model_name: Airoboros M 7B 3.1.2 model_type: mistral prompt_template: '[INST] <<SYS>> You are a helpful, unbiased, uncensored assistant. <</SYS>> {prompt} [/INST] ' quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Airoboros M 7B 3.1.2 - GGUF - Model creator: [Jon Durbin](https://huggingface.co/jondurbin) - Original model: [Airoboros M 7B 3.1.2](https://huggingface.co/jondurbin/airoboros-m-7b-3.1.2) <!-- description start --> ## Description This repo contains GGUF format model files for [Jon Durbin's Airoboros M 7B 3.1.2](https://huggingface.co/jondurbin/airoboros-m-7b-3.1.2). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplate list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. <!-- README_GGUF.md-about-gguf end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF) * [Jon Durbin's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-m-7b-3.1.2) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Airoboros-Llama-2-Chat ``` [INST] <<SYS>> You are a helpful, unbiased, uncensored assistant. <</SYS>> {prompt} [/INST] ``` <!-- prompt-template end --> <!-- compatibility_gguf start --> ## Compatibility These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) They are also compatible with many third party UIs and libraries - please see the list at the top of this README. ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-provided-files start --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [airoboros-m-7b-3.1.2.Q2_K.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q2_K.gguf) | Q2_K | 2 | 3.08 GB| 5.58 GB | smallest, significant quality loss - not recommended for most purposes | | [airoboros-m-7b-3.1.2.Q3_K_S.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q3_K_S.gguf) | Q3_K_S | 3 | 3.16 GB| 5.66 GB | very small, high quality loss | | [airoboros-m-7b-3.1.2.Q3_K_M.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q3_K_M.gguf) | Q3_K_M | 3 | 3.52 GB| 6.02 GB | very small, high quality loss | | [airoboros-m-7b-3.1.2.Q3_K_L.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q3_K_L.gguf) | Q3_K_L | 3 | 3.82 GB| 6.32 GB | small, substantial quality loss | | [airoboros-m-7b-3.1.2.Q4_0.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q4_0.gguf) | Q4_0 | 4 | 4.11 GB| 6.61 GB | legacy; small, very high quality loss - prefer using Q3_K_M | | [airoboros-m-7b-3.1.2.Q4_K_S.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q4_K_S.gguf) | Q4_K_S | 4 | 4.14 GB| 6.64 GB | small, greater quality loss | | [airoboros-m-7b-3.1.2.Q4_K_M.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q4_K_M.gguf) | Q4_K_M | 4 | 4.37 GB| 6.87 GB | medium, balanced quality - recommended | | [airoboros-m-7b-3.1.2.Q5_0.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q5_0.gguf) | Q5_0 | 5 | 5.00 GB| 7.50 GB | legacy; medium, balanced quality - prefer using Q4_K_M | | [airoboros-m-7b-3.1.2.Q5_K_S.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q5_K_S.gguf) | Q5_K_S | 5 | 5.00 GB| 7.50 GB | large, low quality loss - recommended | | [airoboros-m-7b-3.1.2.Q5_K_M.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q5_K_M.gguf) | Q5_K_M | 5 | 5.13 GB| 7.63 GB | large, very low quality loss - recommended | | [airoboros-m-7b-3.1.2.Q6_K.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q6_K.gguf) | Q6_K | 6 | 5.94 GB| 8.44 GB | very large, extremely low quality loss | | [airoboros-m-7b-3.1.2.Q8_0.gguf](https://huggingface.co/TheBloke/Airoboros-M-7B-3.1.2-GGUF/blob/main/airoboros-m-7b-3.1.2.Q8_0.gguf) | Q8_0 | 8 | 7.70 GB| 10.20 GB | very large, extremely low quality loss - not recommended | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. <!-- README_GGUF.md-provided-files end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: - LM Studio - LoLLMS Web UI - Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: TheBloke/Airoboros-M-7B-3.1.2-GGUF and below it, a specific filename to download, such as: airoboros-m-7b-3.1.2.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download TheBloke/Airoboros-M-7B-3.1.2-GGUF airoboros-m-7b-3.1.2.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download TheBloke/Airoboros-M-7B-3.1.2-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Airoboros-M-7B-3.1.2-GGUF airoboros-m-7b-3.1.2.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 32 -m airoboros-m-7b-3.1.2.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "[INST] <<SYS>>\nYou are a helpful, unbiased, uncensored assistant.\n<</SYS>>\n\n{prompt} [/INST]" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. ### How to load this model in Python code, using ctransformers #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install ctransformers # Or with CUDA GPU acceleration pip install ctransformers[cuda] # Or with AMD ROCm GPU acceleration (Linux only) CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers # Or with Metal GPU acceleration for macOS systems only CT_METAL=1 pip install ctransformers --no-binary ctransformers ``` #### Simple ctransformers example code ```python from ctransformers import AutoModelForCausalLM # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = AutoModelForCausalLM.from_pretrained("TheBloke/Airoboros-M-7B-3.1.2-GGUF", model_file="airoboros-m-7b-3.1.2.Q4_K_M.gguf", model_type="mistral", gpu_layers=50) print(llm("AI is going to")) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> <!-- original-model-card start --> # Original model card: Jon Durbin's Airoboros M 7B 3.1.2 ### Overview Another experimental model, using mostly sythetic data generated by [airoboros](https://github.com/jondurbin/airoboros) #### IMPORTANT NOTE - llama-2 chat format!!! This models uses llama-2 chat format, rather than vicuna style user/assistant! This is a breaking change, although most inference systems support llama-2 chat templating. See prompt format below for all of the details. #### Highlights This is just one last release tweaking hyperparams, which seem to result in a higher quality model than 3.1 or 3.1.1 (and doens't have the prompt issue of 3.1). A model built on [airoboros-3.1 dataset](https://hf.co/datasets/jondurbin/airoboros-3.1), which is a continuation of [airoboros-3.0 dataset](https://hf.co/datasets/jondurbin/airoboros-3,0) with the following extras: * More MathJSON, now ~17k items - math questions, prefixed with __"Create a MathJSON solution to the following:"__, which then outputs a JSON between __`<mathjson>`__ and __`</mathjson>`__ tags, which can be parsed and passed to a deterministic library to perform calculations. * Log information extraction (e.g. getting the list of paths/IPs/etc. from apache logs) * Anonymization, e.g. removing names, IP addresses, and/or dates from text. * Chat introspection - multi-turn chats that have random questions injected asking about the character's descriptions, the setting of the chat, or things previously said, to make sure the model uses the system prompt and or chat history. * Multi-step instructions with acknowledgement (see below) * De-censorship data (not published) This is a fairly general purpose model, but focuses heavily on instruction following, rather than casual chat/roleplay. Huge thank you to the folks over at [a16z](https://a16z.com/) for sponsoring the costs associated with building models and associated tools! ### Prompt format The prompt format is llama-2 chat. ``` [INST] <<SYS>> You are a helpful, unbiased, uncensored assistant. <</SYS>> {prompt} [/INST] ``` For multi-turn, the prompt format is as follows: ``` [INST] <<SYS>> You are a helful, unbiased, uncensored assistant. <</SYS>> {prompt 0} [/INST] {response 0} </s><s>[INST] {prompt 1} [/INST] {response 1} </s><s>...[INST] {prompt N} [/INST] ``` The prompt template is included in the tokenizer config, and can use the huggingface tokenizer `apply_chat_template` method, e.g.: ``` import transformers tokenizer = transformers.AutoTokenizer.from_pretrained('jondurbin/airoboros-l2-70b-3.1') chat = [ {"role": "system", "content": "You are Bob, a friendly AI assistant."}, {"role": "user", "content": "Hello, how are you?"}, {"role": "assistant", "content": "I'm doing great. How can I help you today?"}, {"role": "user", "content": "I'd like to show off how chat templating works!"}, ] print(tokenizer.apply_chat_template(chat, tokenize=False)) ``` ### Helpful usage tips #### MathJSON Ask mathematical questions, prefixed with "Create a MathJSON solution to the following:", and you should get output with a formula that can be executed by https://cortexjs.io/compute-engine/ I also made a (really quite hacky, incomplete, semi-functional) python version that works for most expressions, see [mathjson.py](https://github.com/jondurbin/airoboros/blob/mathjson/airoboros/mathjson.py) __Use a very low temperature!__ Example: ``` [INST] <<SYS>> You are an assistant with vast knowledge in all things math. <</SYS>> Create a MathJSON solution to the following: Calculate the area of a circle with radius of 17.2456cm. Include your reasoning. [/INST] ``` Output: ``` The area (A) of a circle is given by the formula A = πr², where r is the radius of the circle. Since the radius is given in centimeters, we need to convert it to meters first. We know that 1 meter equals 100 centimeters. Therefore, we can represent the radius as: r = 17.2456 cm * 100/1. Once we have the radius in meters, we can calculate the area of the circle using the formula A = πr². Solution as MathJSON: <mathjson> [ "Multiply", "Pi", [ "Power", 17.2456, 2 ] ] </mathjson> ``` You can then validate the JSON between `<mathjson>` and `</mathjson>`, then pass the parsed JSON to compute-engine JS or the `evaluate` function in mathjson.py to calculate the response. #### Context obedient question answering By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations. The format for a closed-context prompt is as follows: ``` BEGININPUT BEGINCONTEXT [key0: value0] [key1: value1] ... other metdata ... ENDCONTEXT [insert your text blocks here] ENDINPUT [add as many other blocks, in the exact same format] BEGININSTRUCTION [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.] ENDINSTRUCTION ``` It's also helpful to add "Don't make up answers if you don't know." to your instruction block to make sure if the context is completely unrelated it doesn't make something up. *The __only__ prompts that need this closed context formating are closed-context instructions. Normal questions/instructions do not!* I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it. - `BEGININPUT` - denotes a new input block - `BEGINCONTEXT` - denotes the block of context (metadata key/value pairs) to associate with the current input block - `ENDCONTEXT` - denotes the end of the metadata block for the current input - [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context. - `ENDINPUT` - denotes the end of the current input block - [repeat as many input blocks in this format as you want] - `BEGININSTRUCTION` - denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above. - [instruction(s)] - `ENDINSTRUCTION` - denotes the end of instruction set It sometimes works without `ENDINSTRUCTION`, but by explicitly including that in the prompt, the model better understands that all of the instructions in the block should be responded to. __Use a very low temperature!__ Here's a trivial, but important example to prove the point: ``` BEGININPUT BEGINCONTEXT date: 2021-01-01 url: https://web.site/123 ENDCONTEXT In a shocking turn of events, blueberries are now green, but will be sticking with the same name. ENDINPUT BEGININSTRUCTION What color are bluberries? Source? ENDINSTRUCTION ``` And the response: ``` Blueberries are now green. Source: date: 2021-01-01 url: https://web.site/123 ``` #### Summarization 500 samples have been included from [this dataset](https://huggingface.co/datasets/mattpscott/airoboros-summarization), using the same format as contextual question answering, for example: ``` BEGININPUT {text to summarize} ENDINPUT BEGININSTRUCTION Summarize the input in around 130 words. ENDINSTRUCTION ``` #### Getting longer responses You can use a few techniques to get longer responses. Detailed prompts, with explicit instruction for word count: ``` Please compose a narrative set in the heart of an ancient library, steeped in the scent of old parchment and ink. The protagonist should be a young scholar who is dedicated to studying the art of storytelling and its evolution throughout history. In her pursuit of knowledge, she stumbles upon a forgotten tome that seems to possess an unusual aura. This book has the ability to bring stories to life, literally manifesting characters and scenarios from within its pages into reality. The main character must navigate through various epochs of storytelling - from oral traditions of tribal societies, through medieval minstrels' tales, to modern-day digital narratives - as they come alive around her. Each era presents its unique challenges and lessons about the power and impact of stories on human civilization. One such character could be a sentient quill pen, who was once used by renowned authors of yesteryears and now holds their wisdom and experiences. It becomes her mentor, guiding her through this journey with witty remarks and insightful commentary. Ensure that your tale encapsulates the thrill of adventure, the beauty of learning, and the profound connection between humans and their stories. All characters involved should be non-human entities. Feel free to explore creative liberties but maintain the mentioned elements. Your response should be approximately 2300 words. ``` Or, a simpler example: ``` Please create a long, detailed story about a dragon in an old growth forest who, for some reason, begins speaking the words of the source code of linux. ``` There are a few examples of next chapter completion as well, e.g.: ``` Write the next chapter of a historical fiction novel set in Paris during the 20th century. Here's a summary of the previous chapter: In the vibrant city of Paris, amid the tumultuous changes of the 20th century, our protagonist Margot, an aspiring fashion designer, has just secured an apprenticeship at a prestigious couture house. She meets Lucien, a charming journalist who covers the fashion industry. Together they navigate the ever-changing world of fashion and society, uncovering secrets that reveal the intricate links between style, politics, and culture. As the chapter concludes, they decide to delve deeper into the hidden corners of the fashion world to unravel its mysteries. Requirements for the next chapter: 1. Character Development of Margot and Lucien: - Margot's Evolution: Unfold more about Margot's past, her dreams of revolutionizing fashion, and her struggle to establish herself in a male-dominated industry. Illustrate her growing expertise, innovative ideas, and increasing dependence on Lucien. - Lucien's Complexity: Introduce uncertainties surrounding Lucien's background and real motives. Increase suspense by suggesting undisclosed information he possesses, while also highlighting his wit and perceptiveness. 2. Exploration of Paris and the Couture House: - Paris: Elaborate their journey through the bustling streets of Paris, including encounters with iconic figures, social unrest, and relics from different eras of French history. - The Couture House: Expand on the grandeur of the couture house they work in, filled with artistic masterpieces, intense competition, and cryptic notes hinting at a scandalous past. 3. Emergence of the Subplot: The Lost Collection: - Discovery: Have Margot and Lucien stumble upon a secret vault containing a lost collection designed before World War II, raising new questions about the previous owner and the influence of war on fashion. - Revelation: Capture their shock as they realize the designs were plagiarized, the potential repercussions, and the opportunities it presents for Margot's career. - Twist: End with a twist that suggests there are other stolen collections across Paris, setting up their new mission. Your response should be approximately 650 words. ``` #### Coding You can ask for fairly complex coding instructions with multiple criteria, e.g.: ``` Create a python application with the following requirements: - Asyncio FastAPI webserver - ping endpoint that returns the current date in JSON format - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate ``` Or inline criteria: ``` Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values. ``` You can also optionally add a single space and "PLAINFORMAT" at the end of your prompt to avoid backticks, explanations, etc. and just print the code, e.g.: ``` Write a websocket application in node.js. PLAINFORMAT ``` #### Agent/function calling The dataset includes many examples of function/args generation based on input criteria. This is somewhat similar to the OpenAI function calling, but the output is either JSON or YAML. Example prompt: ``` As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format. Input: I want to know how many times 'Python' is mentioned in my text file. Available functions: file_analytics: description: This tool performs various operations on a text file. params: action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc. filters: keyword: The word or phrase we want to search for. ``` Response: ```json { "function": "file_analytics", "params": { "action": "count_occurrences", "filters": { "keyword": "Python" } } } ``` #### Chain-of-thought You can ask for several possible responses to a given problem, with a ranking and final answer selection. Example prompt: ``` A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one. ``` Example response: ``` Solution 1: In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players). The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows: n(n-1)/2 = 45 Solving this equation gives us n=10. Final answer: There were 10 players in the tournament. Solution 2: Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers. If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players. Final answer: There were 10 players in the tournament. Solution 3: We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 games. For example, with 2 players, only 1 game is played; with 3 players, 3 games are played; with 4 players, 6 games are played, and so on. Continuing this process, we find that with 10 players, 45 games are played. Final answer: There were 10 players in the tournament. Ranking of solutions from best to worst: 1. Solution 1: This solution uses direct mathematical reasoning based on the properties of a round-robin tournament and solves an equation to find the answer. 2. Solution 2: This solution uses the concept of triangular numbers which requires additional steps and knowledge beyond the immediate problem context, but still arrives at the correct answer. 3. Solution 3: This solution relies on trial and error, which is less efficient and reliable than the other methods, but it eventually gets to the right answer. Best and final answer: There were 10 players in the tournament. ``` #### reWOO style execution planning The model now supports execution planning for complex instructions that would require making use of several tools. The output is just the plan, you must implement a mechanism to parse the output and actually call the functions! Example prompt: ``` Please construct a systematic plan to generate an optimal response to the user instruction, utilizing a set of provided tools. Each plan will correspond to an evidence value, which will be the output of one of the available functions given an input string that could be the user's question, one or more prior evidence values, or a combination of both. Here are the tools available to be called: DuckDuckGo[input]: Tool that enables the user to search for information using the DuckDuckGo search engine. This tool is helpful in locating a suitable list of sites that may contain the answer to the user's query. It does not directly answer the question but finds a list of sites that might have the answer. TextScraper[input]: Load one or more websites from the input string containing newline delimited links, where input is one or more links, and produces plain text output containing the content of the links. HyperlinkExtractor[input]: Extract links from plain text and produces a plain text, newline delimited response of links. KnowledgeModel[input]: Question answering language model, particularly useful in answering questions based on an input passage of text. The input must be a text question that references an :evidence[n]: variable, e.g. What color is the cat, given :evidence1:? The output should be in format: Plan: [first action to take based on input question] :evidence0: = [function to call with input parameter] Plan: [next action to take, based on result of :evidence0:] :evidence1: = [next function to call and input parameter, which may include reference to previous evidence, e.g. "Given context :evidence0"] ... Answer: [:evidence[n]: containing the final answer.] Question: Who won the Nobel Prize in Literature in 2020 and what is their most famous work? ``` Response: ``` Plan: Begin by conducting a web search to find out who won the Nobel Prize in Literature in 2020. :evidence0: = DuckDuckGo[Nobel Prize in Literature 2020 winner] Plan: Utilize the KnowledgeModel to interpret the search results and find the name of the laureate. :evidence1: = KnowledgeModel[Who won the Nobel Prize in Literature in 2020, given :evidence0:?] Plan: Conduct another web search to find the most famous work of the identified laureate. :evidence2: = DuckDuckGo[Most famous work of :evidence1:] Plan: Extract the relevant links from the DuckDuckGo search results for a more focused search. :evidence3: = HyperlinkExtractor[:evidence2:] Plan: Use the TextScraper tool to extract information from the relevant links. :evidence4: = TextScraper[:evidence3:] Plan: Finally, utilize the KnowledgeModel to identify and summarize the most famous work of the laureate from the extracted information. :evidence5: = KnowledgeModel[What is the most famous work of :evidence1:, given :evidence4:?] Answer: :evidence5: ``` For this to be useful, you'd have to parse the output plan text, and implement/call each of the functions. This is just pseudo-code, completely untested off the top of my head, and obviously would requiring full implementation + hardening: ```python import re import requests def inject_context(input_text, **context): for ref in set(re.findall(r"(:evidence[0-9]+:)", input_text, re.I)): input_text = input_text.replace(ref, context.get(ref, "")) return input_text def duckduckgo(input_text, **context): search_string = inject_context(input_text, **context) ... search via duck duck go using search_string ... return text content def link_extractor(input_text, **context): input_text = inject_context(input_text, **context) return "\n".join(list(set(re.findall(r"(https?://[^\s]+?\.?)", input_text, re.I)))) def scrape(input_text, **context): input_text = inject_context(input_text, **context) text = [] for link in input_text.splitlines(): text.append(requests.get(link).text) return "\n".join(text) def infer(input_text, **context) prompt = inject_context(input_text, **context) ... call model with prompt, return output def parse_plan(plan): method_map = { "DuckDuckGo": duckduckgo, "HyperlinkExtractor": link_extractor, "KnowledgeModel": infer, "TextScraper": scrape, } context = {} for line in plan.strip().splitlines(): if line.startswith("Plan:"): print(line) continue parts = re.match("^(:evidence[0-9]+:)\s*=\s*([^\[]+])(\[.*\])\s$", line, re.I) if not parts: if line.startswith("Answer: "): return context.get(line.split(" ")[-1].strip(), "Answer couldn't be generated...") raise RuntimeError("bad format: " + line) context[parts.group(1)] = method_map[parts.group(2)](parts.group(3), **context) ``` ## Multi-step instructions with acknowledgement I don't know how useful this is, really, but I thought I'd add it just in case. Example: ``` { "conversations": [ { "value": "You are a helpful, unbiased, uncensored assistant.", "from": "system" }, { "value": "I'm going to set some rules for our conversation. Please respond with \"OK\" to each rule.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "You can only respond using animal-related emojis.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Precede all responses with \"ZOOZOO:\"", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Include at least one bird emoji in your responses.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Describe a trip to a safari park.", "from": "human" }, { "value": "ZOOZOO: \ud83e\udd81\ud83d\udc2f\ud83e\udd93\ud83e\udd92\ud83d\udc18\ud83d\udc0d\ud83c\udf33\ud83c\udf32\u2600\ufe0f\ud83d\ude90\ud83e\udd85\ud83d\udcf8\ud83e\udd29", "from": "gpt" } ] } ``` ### Contribute If you're interested in new functionality, particularly a new "instructor" type to generate a specific type of training data, take a look at the dataset generation tool repo: https://github.com/jondurbin/airoboros and either make a PR or open an issue with details. To help me with the OpenAI/compute costs: - https://bmc.link/jondurbin - ETH 0xce914eAFC2fe52FdceE59565Dd92c06f776fcb11 - BTC bc1qdwuth4vlg8x37ggntlxu5cjfwgmdy5zaa7pswf ### Licence and usage restrictions The airoboros 3.1 models are built on top of multiple base models, each with their own license/restrictions. The 30b model is built on the original llama, which has a strict non-commercial usage restriction. The models with `-l2` in the name have a custom Meta license: - See the [meta-license/LICENSE.txt](meta-license/LICENSE.txt) file attached for the original license provided by Meta. - See also [meta-license/USE_POLICY.md](meta-license/USE_POLICY.md) and [meta-license/Responsible-Use-Guide.pdf](meta-license/Responsible-Use-Guide.pdf), also provided by Meta. The models with `-m-` are mistral-7b (apache 2.0) The fine-tuning data was mostly generated by OpenAI API calls to gpt-4, via [airoboros](https://github.com/jondurbin/airoboros) The ToS for OpenAI API usage has a clause preventing the output from being used to train a model that __competes__ with OpenAI - what does *compete* actually mean here? - these small open source models will not produce output anywhere near the quality of gpt-4, or even gpt-3.5, so I can't imagine this could credibly be considered competing in the first place - if someone else uses the dataset to do the same, they wouldn't necessarily be violating the ToS because they didn't call the API, so I don't know how that works - the training data used in essentially all large language models includes a significant amount of copyrighted or otherwise non-permissive licensing in the first place - other work using the self-instruct method, e.g. the original here: https://github.com/yizhongw/self-instruct released the data and model as apache-2 I am purposingly leaving this license ambiguous (other than the fact you must comply with the Meta original license for llama-2) because I am not a lawyer and refuse to attempt to interpret all of the terms accordingly. Your best bet is probably to avoid using this commercially due to the OpenAI API usage. Either way, by using this model, you agree to completely indemnify me. <!-- original-model-card end -->
PowerInfer/ReluLLaMA-70B-PowerInfer-GGUF
PowerInfer
2024-02-02T02:24:33Z
639
8
transformers
[ "transformers", "gguf", "relullama", "en", "license:llama2", "endpoints_compatible", "region:us" ]
null
2023-12-16T02:51:46Z
--- license: llama2 language: - en --- # ReluLLaMA-70B-PowerInfer-GGUF - Original model: [SparseLLM/ReluLLaMA-70B](https://huggingface.co/SparseLLM/ReluLLaMA-70B) - Converted & distributed by: [PowerInfer](https://huggingface.co/PowerInfer) This model is the downstream distribution of [SparseLLM/ReluLLaMA-70B](https://huggingface.co/SparseLLM/ReluLLaMA-70B) in PowerInfer GGUF format consisting of the LLM model weights and predictor weights.
kopyl/ui-icons-256
kopyl
2024-03-01T08:41:59Z
639
13
diffusers
[ "diffusers", "safetensors", "stable-diffusion-14", "stable-diffusion-14-diffusers", "text-to-image", "miniSD", "ui", "icons", "logo", "symbol", "mark", "base_model:lambdalabs/miniSD-diffusers", "license:creativeml-openrail-m", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
2024-02-29T11:56:16Z
--- license: creativeml-openrail-m base_model: "lambdalabs/miniSD-diffusers" tags: - stable-diffusion-14 - stable-diffusion-14-diffusers - text-to-image - diffusers - miniSD - ui - icons - logo - symbol - mark inference: true --- SOTA model for generating icons. Motivation: I spent $2000 of my own money to train this model. I was unable to monetize it, so I'm sharing it with others. <img src="https://avatars.githubusercontent.com/u/95939477?s=200&v=4" width="60"/> Train on Runpod. Trained on MiniSD. Used x8 A100 SXM for training. Want to collaborate on open source together with me? Send me a message: [email protected] / telegram @kopyl Check my other cool projects: - [Logo generator](https://logojinn.com/) - I'm a contributor to [A1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui), [PixArt-alpha](https://github.com/PixArt-alpha/PixArt-alpha), [Onediff](https://github.com/siliconflow/onediff) - [More](https://kopyloleh.com/) Check some cool images i was able to generate with this model. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ae45e642fd3b8dbaee59ce/vyrLVu5WRUbpKBycXk-5a.png) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ae45e642fd3b8dbaee59ce/GvHN_ITCDuEbtmbFvUxgv.png) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ae45e642fd3b8dbaee59ce/h1hBfJdTEOlnhTkRezJ4P.png) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ae45e642fd3b8dbaee59ce/nHv8BZan9QVt7BObLNLvV.png) More cherry-picked generated images: https://t.me/s/sdicon . Or generate your own via a free Telegram bot: https://t.me/aiiconbot . I'd love if you could use it in your app and let me know. Also not mandatory, but i'd appreciate if you could attribute me to it by putting my website https://kopyloleh.com/ . This model is only able to generate images in 256x256px size, so you need to use some upscaler. I use Real ESRGAN, but you could also try SUPIR. All prompts have to end with " icon". Meaning: - lion icon - snowman icon You can find the AUTOMATIC1111 WebUI checkpoint here: https://civitai.com/models/327499/ui-icons
yainage90/fashion-pattern-clip
yainage90
2024-03-06T06:38:08Z
639
0
transformers
[ "transformers", "safetensors", "clip", "zero-shot-image-classification", "license:mit", "endpoints_compatible", "region:us" ]
zero-shot-image-classification
2024-03-02T05:00:35Z
--- license: mit --- This is finetuned version of `patrickjohncyh/fashion-clip` with fashion products pattern images dataset. Dataset link: https://huggingface.co/datasets/yainage90/fashion-pattern-images ``` python from PIL import Image from transformers import CLIPProcessor, CLIPModel ckpt = "yainage90/fashion-pattern-clip" processor = CLIPProcessor.from_pretrained(ckpt) model = CLIPModel.from_pretrained(ckpt) image = Image.open("<path/to/image>") labels = [ "gradient", "snow_flake", "camouflage", "dot", "zebra", "leopard", "lettering", "snake_skin", "geometric", "muji", "floral", "zigzag", "graphic", "paisley", "tropical", "checked", "houndstooth", "argyle", "stripe", ] inputs = processor(text=labels, images=image, padding=True, return_tensors="pt") outputs = model(**inputs) probs = outputs.logits_per_image.softmax(dim=-1).squeeze() sorted_indices = probs.argsort(dim=-1, descending=True) for i in sorted_indices.tolist(): pattern = labels[i] prob = probs[i] print(f"{pattern}: {prob:.3f}") ```
deepseek-ai/deepseek-vl-1.3b-base
deepseek-ai
2024-03-15T07:04:27Z
639
40
transformers
[ "transformers", "safetensors", "multi_modality", "arxiv:2403.05525", "license:other", "endpoints_compatible", "region:us" ]
null
2024-03-07T07:45:24Z
--- license: other license_name: deepseek license_link: LICENSE --- ## 1. Introduction Introducing DeepSeek-VL, an open-source Vision-Language (VL) Model designed for real-world vision and language understanding applications. DeepSeek-VL possesses general multimodal understanding capabilities, capable of processing logical diagrams, web pages, formula recognition, scientific literature, natural images, and embodied intelligence in complex scenarios. [DeepSeek-VL: Towards Real-World Vision-Language Understanding](https://arxiv.org/abs/2403.05525) [**Github Repository**](https://github.com/deepseek-ai/DeepSeek-VL) Haoyu Lu*, Wen Liu*, Bo Zhang**, Bingxuan Wang, Kai Dong, Bo Liu, Jingxiang Sun, Tongzheng Ren, Zhuoshu Li, Hao Yang, Yaofeng Sun, Chengqi Deng, Hanwei Xu, Zhenda Xie, Chong Ruan (*Equal Contribution, **Project Lead) ![](https://github.com/deepseek-ai/DeepSeek-VL/blob/main/images/sample.jpg) ### 2. Model Summary DeepSeek-VL-1.3b-base is a tiny vision-language model. It uses the [SigLIP-L](https://huggingface.co/timm/ViT-L-16-SigLIP-384) as the vision encoder supporting 384 x 384 image input and is constructed based on the DeepSeek-LLM-1.3b-base which is trained on an approximate corpus of 500B text tokens. The whole DeepSeek-VL-1.3b-base model is finally trained around 400B vision-language tokens. ## 3. Quick Start ### Installation On the basis of `Python >= 3.8` environment, install the necessary dependencies by running the following command: ```shell git clone https://github.com/deepseek-ai/DeepSeek-VL cd DeepSeek-VL pip install -e . ``` ### Simple Inference Example ```python import torch from transformers import AutoModelForCausalLM from deepseek_vl.models import VLChatProcessor, MultiModalityCausalLM from deepseek_vl.utils.io import load_pil_images # specify the path to the model model_path = "deepseek-ai/deepseek-vl-1.3b-base" vl_chat_processor: VLChatProcessor = VLChatProcessor.from_pretrained(model_path) tokenizer = vl_chat_processor.tokenizer vl_gpt: MultiModalityCausalLM = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True) vl_gpt = vl_gpt.to(torch.bfloat16).cuda().eval() conversation = [ { "role": "User", "content": "<image_placeholder>Describe each stage of this image.", "images": ["./images/training_pipelines.png"] }, { "role": "Assistant", "content": "" } ] # load images and prepare for inputs pil_images = load_pil_images(conversation) prepare_inputs = vl_chat_processor( conversations=conversation, images=pil_images, force_batchify=True ).to(vl_gpt.device) # run image encoder to get the image embeddings inputs_embeds = vl_gpt.prepare_inputs_embeds(**prepare_inputs) # run the model to get the response outputs = vl_gpt.language_model.generate( inputs_embeds=inputs_embeds, attention_mask=prepare_inputs.attention_mask, pad_token_id=tokenizer.eos_token_id, bos_token_id=tokenizer.bos_token_id, eos_token_id=tokenizer.eos_token_id, max_new_tokens=512, do_sample=False, use_cache=True ) answer = tokenizer.decode(outputs[0].cpu().tolist(), skip_special_tokens=True) print(f"{prepare_inputs['sft_format'][0]}", answer) ``` ### CLI Chat ```bash python cli_chat.py --model_path "deepseek-ai/deepseek-vl-1.3b-base" # or local path python cli_chat.py --model_path "local model path" ``` ## 4. License This code repository is licensed under [the MIT License](https://github.com/deepseek-ai/DeepSeek-LLM/blob/HEAD/LICENSE-CODE). The use of DeepSeek-VL Base/Chat models is subject to [DeepSeek Model License](https://github.com/deepseek-ai/DeepSeek-LLM/blob/HEAD/LICENSE-MODEL). DeepSeek-VL series (including Base and Chat) supports commercial use. ## 5. Citation ``` @misc{lu2024deepseekvl, title={DeepSeek-VL: Towards Real-World Vision-Language Understanding}, author={Haoyu Lu and Wen Liu and Bo Zhang and Bingxuan Wang and Kai Dong and Bo Liu and Jingxiang Sun and Tongzheng Ren and Zhuoshu Li and Yaofeng Sun and Chengqi Deng and Hanwei Xu and Zhenda Xie and Chong Ruan}, year={2024}, eprint={2403.05525}, archivePrefix={arXiv}, primaryClass={cs.AI} } ``` ## 6. Contact If you have any questions, please raise an issue or contact us at [[email protected]](mailto:[email protected]).
mmnga/Ninja-v1-gguf
mmnga
2024-05-04T13:26:22Z
639
0
null
[ "gguf", "en", "ja", "dataset:TFMC/imatrix-dataset-for-japanese-llm", "license:apache-2.0", "region:us" ]
null
2024-05-03T14:03:22Z
--- license: apache-2.0 language: - en - ja datasets: - TFMC/imatrix-dataset-for-japanese-llm --- # Ninja-v1-gguf [Local-Novel-LLM-projectさんが公開しているNinja-v1](https://huggingface.co/Local-Novel-LLM-project/Ninja-v1)のggufフォーマット変換版です。 imatrixのデータは[TFMC/imatrix-dataset-for-japanese-llm](https://huggingface.co/datasets/TFMC/imatrix-dataset-for-japanese-llm)を使用して作成しました。 # 他のモデル [mmnga/Ninja-v1-gguf](https://huggingface.co/mmnga/Ninja-v1-gguf) [mmnga/Ninja-v1-NSFW-gguf](https://huggingface.co/mmnga/Ninja-v1-NSFW-gguf) [mmnga/Ninja-v1-128k-gguf](https://huggingface.co/mmnga/Ninja-v1-128k-gguf) [mmnga/Ninja-v1-NSFW-128k-gguf](https://huggingface.co/mmnga/Ninja-v1-NSFW-128k-gguf) [mmnga/Vecteus-v1-gguf](https://huggingface.co/mmnga/Vecteus-v1-gguf) ## Usage ``` git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp make -j ./main -m 'Ninja-v1-Q4_0.gguf' -n 128 -p 'あなたはプロの小説家です。\n小説を書いてください\n-------- \nくじらの物語\n-------- \n' ```
mradermacher/Jais-70b-i1-GGUF
mradermacher
2024-06-08T18:12:58Z
639
0
transformers
[ "transformers", "gguf", "en", "base_model:fne/Jais-70b", "license:other", "endpoints_compatible", "region:us" ]
null
2024-06-08T06:23:22Z
--- base_model: fne/Jais-70b language: - en library_name: transformers license: other license_link: https://huggingface.co/airev-ai/Jais-70b/blob/main/LICENSE license_name: airev-model-license quantized_by: mradermacher --- ## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: nicoboss --> weighted/imatrix quants of https://huggingface.co/fne/Jais-70b <!-- provided-files --> static quants are available at https://huggingface.co/mradermacher/Jais-70b-GGUF ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ1_S.gguf) | i1-IQ1_S | 15.4 | for the desperate | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ1_M.gguf) | i1-IQ1_M | 16.9 | mostly desperate | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 19.2 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ2_XS.gguf) | i1-IQ2_XS | 21.2 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ2_S.gguf) | i1-IQ2_S | 22.3 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ2_M.gguf) | i1-IQ2_M | 24.2 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q2_K.gguf) | i1-Q2_K | 26.5 | IQ3_XXS probably better | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 27.6 | lower quality | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ3_XS.gguf) | i1-IQ3_XS | 29.4 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ3_S.gguf) | i1-IQ3_S | 31.0 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q3_K_S.gguf) | i1-Q3_K_S | 31.0 | IQ3_XS probably better | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ3_M.gguf) | i1-IQ3_M | 32.0 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q3_K_M.gguf) | i1-Q3_K_M | 34.4 | IQ3_S probably better | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q3_K_L.gguf) | i1-Q3_K_L | 37.2 | IQ3_M probably better | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-IQ4_XS.gguf) | i1-IQ4_XS | 38.0 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q4_0.gguf) | i1-Q4_0 | 40.2 | fast, low quality | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q4_K_S.gguf) | i1-Q4_K_S | 40.4 | optimal size/speed/quality | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q4_K_M.gguf) | i1-Q4_K_M | 42.6 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q5_K_S.gguf) | i1-Q5_K_S | 48.8 | | | [GGUF](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q5_K_M.gguf) | i1-Q5_K_M | 50.0 | | | [PART 1](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q6_K.gguf.part1of2) [PART 2](https://huggingface.co/mradermacher/Jais-70b-i1-GGUF/resolve/main/Jais-70b.i1-Q6_K.gguf.part2of2) | i1-Q6_K | 58.0 | practically like static Q6_K | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. Additional thanks to [@nicoboss](https://huggingface.co/nicoboss) for giving me access to his hardware for calculating the imatrix for these quants. <!-- end -->
CHE-72/Breeze-7B-Instruct-v1_0-Q3_K_M-GGUF
CHE-72
2024-06-22T18:14:16Z
639
0
null
[ "gguf", "llama-cpp", "gguf-my-repo", "text-generation", "zh", "en", "base_model:MediaTek-Research/Breeze-7B-Instruct-v1_0", "license:apache-2.0", "region:us" ]
text-generation
2024-06-22T18:14:01Z
--- base_model: MediaTek-Research/Breeze-7B-Instruct-v1_0 language: - zh - en license: apache-2.0 pipeline_tag: text-generation tags: - llama-cpp - gguf-my-repo --- # CHE-72/Breeze-7B-Instruct-v1_0-Q3_K_M-GGUF This model was converted to GGUF format from [`MediaTek-Research/Breeze-7B-Instruct-v1_0`](https://huggingface.co/MediaTek-Research/Breeze-7B-Instruct-v1_0) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/MediaTek-Research/Breeze-7B-Instruct-v1_0) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo CHE-72/Breeze-7B-Instruct-v1_0-Q3_K_M-GGUF --hf-file breeze-7b-instruct-v1_0-q3_k_m.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo CHE-72/Breeze-7B-Instruct-v1_0-Q3_K_M-GGUF --hf-file breeze-7b-instruct-v1_0-q3_k_m.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo CHE-72/Breeze-7B-Instruct-v1_0-Q3_K_M-GGUF --hf-file breeze-7b-instruct-v1_0-q3_k_m.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo CHE-72/Breeze-7B-Instruct-v1_0-Q3_K_M-GGUF --hf-file breeze-7b-instruct-v1_0-q3_k_m.gguf -c 2048 ```
algoprog/mimics-bart-base
algoprog
2022-02-24T01:31:53Z
638
1
transformers
[ "transformers", "pytorch", "bart", "text2text-generation", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text2text-generation
2022-03-02T23:29:05Z
Entry not found
timm/efficientnet_b3_pruned.in1k
timm
2023-04-27T21:10:36Z
638
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:1905.11946", "arxiv:2002.08258", "license:apache-2.0", "region:us" ]
image-classification
2022-12-12T23:56:48Z
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for efficientnet_b3_pruned.in1k A EfficientNet image classification model. Knapsack pruned from existing weights. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 9.9 - GMACs: 1.0 - Activations (M): 11.9 - Image size: 300 x 300 - **Papers:** - EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks: https://arxiv.org/abs/1905.11946 - Knapsack Pruning with Inner Distillation: https://arxiv.org/abs/2002.08258 - **Dataset:** ImageNet-1k ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('efficientnet_b3_pruned.in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Feature Map Extraction ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'efficientnet_b3_pruned.in1k', pretrained=True, features_only=True, ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 24, 150, 150]) # torch.Size([1, 12, 75, 75]) # torch.Size([1, 40, 38, 38]) # torch.Size([1, 120, 19, 19]) # torch.Size([1, 384, 10, 10]) print(o.shape) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'efficientnet_b3_pruned.in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 1536, 10, 10) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). ## Citation ```bibtex @inproceedings{tan2019efficientnet, title={Efficientnet: Rethinking model scaling for convolutional neural networks}, author={Tan, Mingxing and Le, Quoc}, booktitle={International conference on machine learning}, pages={6105--6114}, year={2019}, organization={PMLR} } ``` ```bibtex @article{aflalo2020knapsack, title={Knapsack pruning with inner distillation}, author={Aflalo, Yonathan and Noy, Asaf and Lin, Ming and Friedman, Itamar and Zelnik, Lihi}, journal={arXiv preprint arXiv:2002.08258}, year={2020} } ``` ```bibtex @misc{rw2019timm, author = {Ross Wightman}, title = {PyTorch Image Models}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, doi = {10.5281/zenodo.4414861}, howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} } ```
BabyChou/Yi-VL-34B
BabyChou
2024-07-03T00:01:15Z
638
1
transformers
[ "transformers", "pytorch", "llava", "text-generation", "conversational", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-generation
2024-01-31T22:10:18Z
--- license: apache-2.0 --- # What is Yi-VL? ## Architecture Yi-VL adopts the [LLaVA](https://github.com/haotian-liu/LLaVA) architecture, which is composed of three primary components: - Vision Transformer (ViT): it's initialized with [CLIP ViT-H/14 model](https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K) and used for image encoding. - Projection Module: it's designed to align image features with text feature space, consisting of a two-layer Multilayer Perceptron (MLP) with layer normalizations. - Large Language Model (LLM): it's initialized with [Yi-34B-Chat](https://huggingface.co/01-ai/Yi-34B-Chat) or [Yi-6B-Chat](https://huggingface.co/01-ai/Yi-6B-Chat), demonstrating exceptional proficiency in understanding and generating both English and Chinese. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/656d9adce8bf55919aca7c3f/EGVHSWG4kAcX01xDaoeXS.png) # How to use Yi-VL? ## Quick start This has been implemented into the SGLang codebase, where you can simply call this model by creating a function like so: ``` import sglang as sgl @sgl.function def image_qa(s, image_path, question): s += sgl.user(sgl.image(image_path) + question) s += sgl.assistant(sgl.gen("answer")) runtime = sgl.Runtime(model_path="BabyChou/Yi-VL-34B", tokenizer_path="BabyChou/Yi-VL-34B") sgl.set_default_backend(runtime) # Single state = image_qa.run( image_path="images/cat.jpeg", question="What is this?", max_new_tokens=64) print(state["answer"], "\n") ``` ## License Please refer to the [acknowledgments and attributions](#acknowledgments_and_attributions) as well as individual components, for the license of source code. The Yi series models are fully open for academic research and free for commercial use, permissions of which are automatically granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://huggingface.co/01-ai/Yi-VL-34B/blob/main/LICENSE). For free commercial use, you only need to send an email to get official commercial permission.
mhenrichsen/gemma-7b
mhenrichsen
2024-02-21T15:45:05Z
638
4
transformers
[ "transformers", "safetensors", "gemma", "text-generation", "arxiv:2305.14314", "arxiv:2312.11805", "arxiv:2009.03300", "arxiv:1905.07830", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1905.10044", "arxiv:1907.10641", "arxiv:1811.00937", "arxiv:1809.02789", "arxiv:1911.01547", "arxiv:1705.03551", "arxiv:2107.03374", "arxiv:2108.07732", "arxiv:2110.14168", "arxiv:2304.06364", "arxiv:2206.04615", "arxiv:1804.06876", "arxiv:2110.08193", "arxiv:2009.11462", "arxiv:2101.11718", "arxiv:1804.09301", "arxiv:2109.07958", "arxiv:2203.09509", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-02-21T15:35:34Z
--- library_name: transformers --- # Reupload of Google Gemma - Find original readme below. # Gemma Model Card **Model Page**: [Gemma](https://ai.google.dev/gemma/docs) This model card corresponds to the 7B base version of the Gemma model. You can also visit the model card of the [2B base model](https://huggingface.co/google/gemma-2b), [7B instruct model](https://huggingface.co/google/gemma-7b-it), and [2B instruct model](https://huggingface.co/google/gemma-2b-it). **Resources and Technical Documentation**: * [Responsible Generative AI Toolkit](https://ai.google.dev/responsible) * [Gemma on Kaggle](https://www.kaggle.com/models/google/gemma) * [Gemma on Vertex Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/335?version=gemma-7b-gg-hf) **Terms of Use**: [Terms](https://www.kaggle.com/models/google/gemma/license/consent) **Authors**: Google ## Model Information Summary description and brief definition of inputs and outputs. ### Description Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. They are text-to-text, decoder-only large language models, available in English, with open weights, pre-trained variants, and instruction-tuned variants. Gemma models are well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as a laptop, desktop or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone. ### Usage Below we share some code snippets on how to get quickly started with running the model. First make sure to `pip install -U transformers`, then copy the snippet from the section that is relevant for your usecase. #### Fine-tuning examples You can find fine-tuning notebooks under the [`examples/` directory](https://huggingface.co/google/gemma-7b/tree/main/examples). We provide: * A script to perform Supervised Fine-Tuning (SFT) on UltraChat dataset using [QLoRA](https://huggingface.co/papers/2305.14314) * A script to perform SFT using FSDP on TPU devices * A notebook that you can run on a free-tier Google Colab instance to perform SFT on English quotes dataset #### Running the model on a CPU ```python from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b") model = AutoModelForCausalLM.from_pretrained("google/gemma-7b") input_text = "Write me a poem about Machine Learning." input_ids = tokenizer(**input_text, return_tensors="pt") outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) ``` #### Running the model on a single / multi GPU ```python # pip install accelerate from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b") model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", device_map="auto") input_text = "Write me a poem about Machine Learning." input_ids = tokenizer(input_text, return_tensors="pt").to("cuda") outputs = model.generate(**input_ids) print(tokenizer.decode(outputs[0])) ``` #### Running the model on a GPU using different precisions * _Using `torch.float16`_ ```python # pip install accelerate from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b") model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", device_map="auto", torch_dtype=torch.float16) input_text = "Write me a poem about Machine Learning." input_ids = tokenizer(input_text, return_tensors="pt").to("cuda") outputs = model.generate(**input_ids) print(tokenizer.decode(outputs[0])) ``` * _Using `torch.bfloat16`_ ```python # pip install accelerate from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b") model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", device_map="auto", torch_dtype=torch.bfloat16) input_text = "Write me a poem about Machine Learning." input_ids = tokenizer(input_text, return_tensors="pt").to("cuda") outputs = model.generate(**input_ids) print(tokenizer.decode(outputs[0])) ``` #### Quantized Versions through `bitsandbytes` * _Using 8-bit precision (int8)_ ```python # pip install bitsandbytes accelerate from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig quantization_config = BitsAndBytesConfig(load_in_8bit=True) tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b") model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", quantization_config=quantization_config) input_text = "Write me a poem about Machine Learning." input_ids = tokenizer(input_text, return_tensors="pt").to("cuda") outputs = model.generate(**input_ids) print(tokenizer.decode(outputs[0])) ``` * _Using 4-bit precision_ ```python # pip install bitsandbytes accelerate from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig quantization_config = BitsAndBytesConfig(load_in_4bit=True) tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b") model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", quantization_config=quantization_config) input_text = "Write me a poem about Machine Learning." input_ids = tokenizer(input_text, return_tensors="pt").to("cuda") outputs = model.generate(**input_ids) print(tokenizer.decode(outputs[0])) ``` #### Other optimizations * _Flash Attention 2_ First make sure to install `flash-attn` in your environment `pip install flash-attn` ```diff model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.float16, + attn_implementation="flash_attention_2" ).to(0) ``` ### Inputs and outputs * **Input:** Text string, such as a question, a prompt, or a document to be summarized. * **Output:** Generated English-language text in response to the input, such as an answer to a question, or a summary of a document. ## Model Data Data used for model training and how the data was processed. ### Training Dataset These models were trained on a dataset of text data that includes a wide variety of sources, totaling 6 trillion tokens. Here are the key components: * Web Documents: A diverse collection of web text ensures the model is exposed to a broad range of linguistic styles, topics, and vocabulary. Primarily English-language content. * Code: Exposing the model to code helps it to learn the syntax and patterns of programming languages, which improves its ability to generate code or understand code-related questions. * Mathematics: Training on mathematical text helps the model learn logical reasoning, symbolic representation, and to address mathematical queries. The combination of these diverse data sources is crucial for training a powerful language model that can handle a wide variety of different tasks and text formats. ### Data Preprocessing Here are the key data cleaning and filtering methods applied to the training data: * CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering was applied at multiple stages in the data preparation process to ensure the exclusion of harmful and illegal content * Sensitive Data Filtering: As part of making Gemma pre-trained models safe and reliable, automated techniques were used to filter out certain personal information and other sensitive data from training sets. * Additional methods: Filtering based on content quality and safely in line with [our policies](https://storage.googleapis.com/gweb-uniblog-publish-prod/documents/2023_Google_AI_Principles_Progress_Update.pdf#page=11). ## Implementation Information Details about the model internals. ### Hardware Gemma was trained using the latest generation of [Tensor Processing Unit (TPU)](https://cloud.google.com/tpu/docs/intro-to-tpu) hardware (TPUv5e). Training large language models requires significant computational power. TPUs, designed specifically for matrix operations common in machine learning, offer several advantages in this domain: * Performance: TPUs are specifically designed to handle the massive computations involved in training LLMs. They can speed up training considerably compared to CPUs. * Memory: TPUs often come with large amounts of high-bandwidth memory, allowing for the handling of large models and batch sizes during training. This can lead to better model quality. * Scalability: TPU Pods (large clusters of TPUs) provide a scalable solution for handling the growing complexity of large foundation models. You can distribute training across multiple TPU devices for faster and more efficient processing. * Cost-effectiveness: In many scenarios, TPUs can provide a more cost-effective solution for training large models compared to CPU-based infrastructure, especially when considering the time and resources saved due to faster training. * These advantages are aligned with [Google's commitments to operate sustainably](https://sustainability.google/operating-sustainably/). ### Software Training was done using [JAX](https://github.com/google/jax) and [ML Pathways](https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture). JAX allows researchers to take advantage of the latest generation of hardware, including TPUs, for faster and more efficient training of large models. ML Pathways is Google's latest effort to build artificially intelligent systems capable of generalizing across multiple tasks. This is specially suitable for [foundation models](https://ai.google/discover/foundation-models/), including large language models like these ones. Together, JAX and ML Pathways are used as described in the [paper about the Gemini family of models](https://arxiv.org/abs/2312.11805); "the 'single controller' programming model of Jax and Pathways allows a single Python process to orchestrate the entire training run, dramatically simplifying the development workflow." ## Evaluation Model evaluation metrics and results. ### Benchmark Results These models were evaluated against a large collection of different datasets and metrics to cover different aspects of text generation: | Benchmark | Metric | 2B Params | 7B Params | | ------------------------------ | ------------- | ----------- | --------- | | [MMLU](https://arxiv.org/abs/2009.03300) | 5-shot, top-1 | 42.3 | 64.3 | | [HellaSwag](https://arxiv.org/abs/1905.07830) | 0-shot |71.4 | 81.2 | | [PIQA](https://arxiv.org/abs/1911.11641) | 0-shot | 77.3 | 81.2 | | [SocialIQA](https://arxiv.org/abs/1904.09728) | 0-shot | 59.7 | 51.8 | | [BooIQ](https://arxiv.org/abs/1905.10044) | 0-shot | 69.4 | 83.2 | | [WinoGrande](https://arxiv.org/abs/1907.10641) | partial score | 65.4 | 72.3 | | [CommonsenseQA](https://arxiv.org/abs/1811.00937) | 7-shot | 65.3 | 71.3 | | [OpenBookQA](https://arxiv.org/abs/1809.02789) | | 47.8 | 52.8 | | [ARC-e](https://arxiv.org/abs/1911.01547) | | 73.2 | 81.5 | | [ARC-c](https://arxiv.org/abs/1911.01547) | | 42.1 | 53.2 | | [TriviaQA](https://arxiv.org/abs/1705.03551) | 5-shot | 53.2 | 63.4 | | [Natural Questions](https://github.com/google-research-datasets/natural-questions) | 5-shot | - | 23 | | [HumanEval](https://arxiv.org/abs/2107.03374) | pass@1 | 22.0 | 32.3 | | [MBPP](https://arxiv.org/abs/2108.07732) | 3-shot | 29.2 | 44.4 | | [GSM8K](https://arxiv.org/abs/2110.14168) | maj@1 | 17.7 | 46.4 | | [MATH](https://arxiv.org/abs/2108.07732) | 4-shot | 11.8 | 24.3 | | [AGIEval](https://arxiv.org/abs/2304.06364) | | 24.2 | 41.7 | | [BIG-Bench](https://arxiv.org/abs/2206.04615) | | 35.2 | 55.1 | | ------------------------------ | ------------- | ----------- | --------- | | **Average** | | **54.0** | **56.4** | ## Ethics and Safety Ethics and safety evaluation approach and results. ### Evaluation Approach Our evaluation methods include structured evaluations and internal red-teaming testing of relevant content policies. Red-teaming was conducted by a number of different teams, each with different goals and human evaluation metrics. These models were evaluated against a number of different categories relevant to ethics and safety, including: * Text-to-Text Content Safety: Human evaluation on prompts covering safety policies including child sexual abuse and exploitation, harassment, violence and gore, and hate speech. * Text-to-Text Representational Harms: Benchmark against relevant academic datasets such as [WinoBias](https://arxiv.org/abs/1804.06876) and [BBQ Dataset](https://arxiv.org/abs/2110.08193v2). * Memorization: Automated evaluation of memorization of training data, including the risk of personally identifiable information exposure. * Large-scale harm: Tests for "dangerous capabilities," such as chemical, biological, radiological, and nuclear (CBRN) risks. ### Evaluation Results The results of ethics and safety evaluations are within acceptable thresholds for meeting [internal policies](https://storage.googleapis.com/gweb-uniblog-publish-prod/documents/2023_Google_AI_Principles_Progress_Update.pdf#page=11) for categories such as child safety, content safety, representational harms, memorization, large-scale harms. On top of robust internal evaluations, the results of well known safety benchmarks like BBQ, BOLD, Winogender, Winobias, RealToxicity, and TruthfulQA are shown here. | Benchmark | Metric | 2B Params | 7B Params | | ------------------------------ | ------------- | ----------- | --------- | | [RealToxicity](https://arxiv.org/abs/2009.11462) | average | 6.86 | 7.90 | | [BOLD](https://arxiv.org/abs/2101.11718) | | 45.57 | 49.08 | | [CrowS-Pairs](https://aclanthology.org/2020.emnlp-main.154/) | top-1 | 45.82 | 51.33 | | [BBQ Ambig](https://arxiv.org/abs/2110.08193v2) | 1-shot, top-1 | 62.58 | 92.54 | | [BBQ Disambig](https://arxiv.org/abs/2110.08193v2) | top-1 | 54.62 | 71.99 | | [Winogender](https://arxiv.org/abs/1804.09301) | top-1 | 51.25 | 54.17 | | [TruthfulQA](https://arxiv.org/abs/2109.07958) | | 44.84 | 31.81 | | [Winobias 1_2](https://arxiv.org/abs/1804.06876) | | 56.12 | 59.09 | | [Winobias 2_2](https://arxiv.org/abs/1804.06876) | | 91.10 | 92.23 | | [Toxigen](https://arxiv.org/abs/2203.09509) | | 29.77 | 39.59 | | ------------------------------ | ------------- | ----------- | --------- | ## Usage and Limitations These models have certain limitations that users should be aware of. ### Intended Usage Open Large Language Models (LLMs) have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development. * Content Creation and Communication * Text Generation: These models can be used to generate creative text formats such as poems, scripts, code, marketing copy, and email drafts. * Chatbots and Conversational AI: Power conversational interfaces for customer service, virtual assistants, or interactive applications. * Text Summarization: Generate concise summaries of a text corpus, research papers, or reports. * Research and Education * Natural Language Processing (NLP) Research: These models can serve as a foundation for researchers to experiment with NLP techniques, develop algorithms, and contribute to the advancement of the field. * Language Learning Tools: Support interactive language learning experiences, aiding in grammar correction or providing writing practice. * Knowledge Exploration: Assist researchers in exploring large bodies of text by generating summaries or answering questions about specific topics. ### Limitations * Training Data * The quality and diversity of the training data significantly influence the model's capabilities. Biases or gaps in the training data can lead to limitations in the model's responses. * The scope of the training dataset determines the subject areas the model can handle effectively. * Context and Task Complexity * LLMs are better at tasks that can be framed with clear prompts and instructions. Open-ended or highly complex tasks might be challenging. * A model's performance can be influenced by the amount of context provided (longer context generally leads to better outputs, up to a certain point). * Language Ambiguity and Nuance * Natural language is inherently complex. LLMs might struggle to grasp subtle nuances, sarcasm, or figurative language. * Factual Accuracy * LLMs generate responses based on information they learned from their training datasets, but they are not knowledge bases. They may generate incorrect or outdated factual statements. * Common Sense * LLMs rely on statistical patterns in language. They might lack the ability to apply common sense reasoning in certain situations. ### Ethical Considerations and Risks The development of large language models (LLMs) raises several ethical concerns. In creating an open model, we have carefully considered the following: * Bias and Fairness * LLMs trained on large-scale, real-world text data can reflect socio-cultural biases embedded in the training material. These models underwent careful scrutiny, input data pre-processing described and posterior evaluations reported in this card. * Misinformation and Misuse * LLMs can be misused to generate text that is false, misleading, or harmful. * Guidelines are provided for responsible use with the model, see the [Responsible Generative AI Toolkit](http://ai.google.dev/gemma/responsible). * Transparency and Accountability: * This model card summarizes details on the models' architecture, capabilities, limitations, and evaluation processes. * A responsibly developed open model offers the opportunity to share innovation by making LLM technology accessible to developers and researchers across the AI ecosystem. Risks identified and mitigations: * Perpetuation of biases: It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases. * Generation of harmful content: Mechanisms and guidelines for content safety are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases. * Misuse for malicious purposes: Technical limitations and developer and end-user education can help mitigate against malicious applications of LLMs. Educational resources and reporting mechanisms for users to flag misuse are provided. Prohibited uses of Gemma models are outlined in the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy). * Privacy violations: Models were trained on data filtered for removal of PII (Personally Identifiable Information). Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques. ### Benefits At the time of release, this family of models provides high-performance open large language model implementations designed from the ground up for Responsible AI development compared to similarly sized models. Using the benchmark evaluation metrics described in this document, these models have shown to provide superior performance to other, comparably-sized open model alternatives.
TinyLlama/TinyLlama_v1.1_chinese
TinyLlama
2024-06-07T01:23:56Z
638
3
transformers
[ "transformers", "pytorch", "llama", "text-generation", "en", "dataset:cerebras/SlimPajama-627B", "arxiv:2401.02385", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-03-09T09:40:17Z
--- license: apache-2.0 datasets: - cerebras/SlimPajama-627B language: - en --- # TinyLlama-1.1B-v1.1 - **Codebase:** [github.com/jzhang38/TinyLlama](https://github.com/jzhang38/TinyLlama) - **Technical Report:** [arxiv.org/pdf/2401.02385](https://arxiv.org/pdf/2401.02385) <div align="center"> <img src="https://huggingface.co/PY007/TinyLlama-1.1B-intermediate-step-240k-503b/resolve/main/TinyLlama_logo.png" width="300"/> </div> We adopted exactly the same architecture and tokenizer as Llama 2. This means TinyLlama can be plugged and played in many open-source projects built upon Llama. Besides, TinyLlama is compact with only 1.1B parameters. This compactness allows it to cater to a multitude of applications demanding a restricted computation and memory footprint. ## Overview In this project, rather than only training a single TinyLlama model, we first train TinyLlama on a corpus of 1.5 trillion tokens to obtain foundational language capabilities. Subsequently, we take this model and turn it into three different models by continual pre-training with three distinct data sampling. For a visual representation of this process, please refer to the figure below. ![Overview](overview.png) ## Pretraining Due to these issues([bug1](https://whimsical-aphid-86d.notion.site/Release-of-TinyLlama-1-5T-Checkpoints-Postponed-01b266998c1c47f78f5ae1520196d194?pvs=4), [bug2](https://whimsical-aphid-86d.notion.site/2023-12-18-Updates-from-TinyLlama-Team-7d30c01fff794da28ccc952f327c8d4f)). We try to retrain our TinyLlama to provide a better model. We train our model with 2T tokens and divided our pretraining into 3 different stages: 1) basic pretraining, 2) continual pretraining with specific domain, and 3) cooldown . #### Basic pretraining In this initial phase, we managed to train our model with only slimpajama to develop its commonsense reasoning capabilities. The model was trained with 1.5T tokens during this basic pretraining period. Since we used a cluster with 4 A100-40G per node and we only shard model weights within a node, we can only set the batch size to approximately 1.8M this time. #### Continual pretraining with specific domain We incorporated 3 different kinds of corpus during this pretraining, slimpajama (which is the same as the first phase), Math&Code (starcoder and proof pile), and Chinese (Skypile). This approach allowed us to develop three variant models with specialized capabilities. At the begining ~6B tokens in this stage, we linearly increased the sampling proportion for the domain-specific corpus (excluding Slimpajama, as it remained unchanged compared with stage 1). This warmup sampling increasing strategy was designed to gradually adjust the distribution of the pretraining data, ensuring a more stable training process. After this sampling increasing stage, we continued pretraining the model with stable sampling strategy until reaching ~1.85T tokens. #### Cooldown Implementing a cooldown phase has become a crucial technique to achieve better model convergence at the end of pretraining. However, since we have already used cosine learning rate strategy at the beginning, it becomes challenging to alter the learning rate for cooldown like what MiniCPM or deepseek does. Therefore, we try to cool down with adjusting our batch size. Specifically, we increase our batch size from 1.8M to 7.2M while keeping the original cosine learning rate schedule during our cooldown stage. #### Tinyllama model family Following an extensive and detailed pretraining process. We are now releasing three specialized versions of our model: 1. **TinyLlama_v1.1**: The standard version, used for general purposes. 2. **TinyLlama_v1.1_Math&Code**: Equipped with better ability for math and code. 3. **TinyLlama_v1.1_Chinese**: Good understanding capacity for Chinese. ## Data Here we list our data distribution in each stage: ### TinyLlama_v1.1 | Corpus | Basic pretraining | Continual pretraining with specific domain | Cooldown | | ------------- | ----------------- | ------------------------------------------ | -------- | | Slimpajama | 100.0 | 100.0 | 100.0 | ### TinyLlama_v1.1_math_code | Corpus | Basic pretraining | Continual pretraining with specific domain | Cooldown | | ------------- | ----------------- | ------------------------------------------ | -------- | | Slimpajama | 100.0 | 75.0 | 75.0 | | starcoder | - | 15.0 | 15.0 | | proof_pile | - | 10.0 | 10.0 | ### TinyLlama_v1.1_chinese | orpus | Basic pretraining | Continual pretraining with specific domain | Cooldown | | ------------- | ----------------- | ------------------------------------------ | -------- | | Slimpajama | 100.0 | 50.0 | 50.0 | | skypile | - | 50.0 | 50.0 | ### How to use You will need the transformers>=4.31 Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) GitHub page for more information. ``` from transformers import AutoTokenizer import transformers import torch model = "TinyLlama/TinyLlama_v1.1" tokenizer = AutoTokenizer.from_pretrained(model) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) sequences = pipeline( 'The TinyLlama project aims to pretrain a 1.1B Llama model on 3 trillion tokens. With some proper optimization, we can achieve this within a span of "just" 90 days using 16 A100-40G GPUs 🚀🚀. The training has started on 2023-09-01.', do_sample=True, top_k=10, num_return_sequences=1, repetition_penalty=1.5, eos_token_id=tokenizer.eos_token_id, max_length=500, ) for seq in sequences: print(f"Result: {seq['generated_text']}") ``` ### Eval | Model | Pretrain Tokens | HellaSwag | Obqa | WinoGrande | ARC_c | ARC_e | boolq | piqa | avg | | ----------------------------------------- | --------------- | --------- | --------- | ---------- | --------- | --------- | ----- | --------- | --------- | | Pythia-1.0B | 300B | 47.16 | 31.40 | 53.43 | 27.05 | 48.99 | 60.83 | 69.21 | 48.30 | | TinyLlama-1.1B-intermediate-step-1431k-3T | 3T | 59.20 | 36.00 | 59.12 | 30.12 | 55.25 | 57.83 | 73.29 | 52.99 | | TinyLlama-1.1B-v1.1 | 2T | **61.47** | **36.80** | 59.43 | 32.68 | **55.47** | 55.99 | **73.56** | 53.63 | | TinyLlama-1.1B-v1_math_code | 2T | 60.80 | 36.40 | **60.22** | **33.87** | 55.20 | 57.09 | 72.69 | **53.75** | | TinyLlama-1.1B-v1.1_chinese | 2T | 58.23 | 35.20 | 59.27 | 31.40 | 55.35 | **61.41** | 73.01 | 53.41 |
MaziyarPanahi/Llama-3-16B-Instruct-v0.1-GGUF
MaziyarPanahi
2024-04-20T07:42:28Z
638
9
transformers
[ "transformers", "gguf", "mistral", "quantized", "2-bit", "3-bit", "4-bit", "5-bit", "6-bit", "8-bit", "GGUF", "text-generation", "mixtral", "base_model:MaziyarPanahi/Llama-3-16B-Instruct-v0.1", "text-generation-inference", "region:us" ]
text-generation
2024-04-19T13:00:16Z
--- tags: - quantized - 2-bit - 3-bit - 4-bit - 5-bit - 6-bit - 8-bit - GGUF - text-generation - mixtral - text-generation model_name: Llama-3-16B-Instruct-v0.1-GGUF base_model: MaziyarPanahi/Llama-3-16B-Instruct-v0.1 inference: false model_creator: MaziyarPanahi pipeline_tag: text-generation quantized_by: MaziyarPanahi --- # [MaziyarPanahi/Llama-3-16B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/Llama-3-16B-Instruct-v0.1-GGUF) - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi) - Original model: [MaziyarPanahi/Llama-3-16B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/Llama-3-16B-Instruct-v0.1) ## Description [MaziyarPanahi/Llama-3-16B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/Llama-3-16B-Instruct-v0.1-GGUF) contains GGUF format model files for [MaziyarPanahi/Llama-3-16B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/Llama-3-16B-Instruct-v0.1). ## Load GGUF models You `MUST` follow the prompt template provided by Llama-3: ```sh ./llama.cpp/main -m Llama-3-11B-Instruct.Q2_K.gguf -r '<|eot_id|>' --in-prefix "\n<|start_header_id|>user<|end_header_id|>\n\n" --in-suffix "<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n" -p "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful, smart, kind, and efficient AI assistant. You always fulfill the user's requests to the best of your ability.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nHi! How are you?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\n" -n 1024 ```
timm/repvgg_b2g4.rvgg_in1k
timm
2024-02-10T23:35:02Z
637
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2101.03697", "license:mit", "region:us" ]
image-classification
2023-03-22T07:22:54Z
--- license: mit library_name: timm tags: - image-classification - timm datasets: - imagenet-1k --- # Model card for repvgg_b2g4.rvgg_in1k A RepVGG image classification model. Trained on ImageNet-1k by paper authors. This model architecture is implemented using `timm`'s flexible [BYOBNet (Bring-Your-Own-Blocks Network)](https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/byobnet.py). BYOBNet allows configuration of: * block / stage layout * stem layout * output stride (dilation) * activation and norm layers * channel and spatial / self-attention layers ...and also includes `timm` features common to many other architectures, including: * stochastic depth * gradient checkpointing * layer-wise LR decay * per-stage feature extraction ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 61.8 - GMACs: 12.6 - Activations (M): 12.9 - Image size: 224 x 224 - **Papers:** - RepVGG: Making VGG-style ConvNets Great Again: https://arxiv.org/abs/2101.03697 - **Dataset:** ImageNet-1k - **Original:** https://github.com/DingXiaoH/RepVGG ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('repvgg_b2g4.rvgg_in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Feature Map Extraction ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'repvgg_b2g4.rvgg_in1k', pretrained=True, features_only=True, ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 64, 112, 112]) # torch.Size([1, 160, 56, 56]) # torch.Size([1, 320, 28, 28]) # torch.Size([1, 640, 14, 14]) # torch.Size([1, 2560, 7, 7]) print(o.shape) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'repvgg_b2g4.rvgg_in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 2560, 7, 7) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). ## Citation ```bibtex @misc{rw2019timm, author = {Ross Wightman}, title = {PyTorch Image Models}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, doi = {10.5281/zenodo.4414861}, howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} } ``` ```bibtex @inproceedings{ding2021repvgg, title={Repvgg: Making vgg-style convnets great again}, author={Ding, Xiaohan and Zhang, Xiangyu and Ma, Ningning and Han, Jungong and Ding, Guiguang and Sun, Jian}, booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, pages={13733--13742}, year={2021} } ```
timm/deit3_small_patch16_384.fb_in1k
timm
2024-02-10T23:37:12Z
637
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2204.07118", "license:apache-2.0", "region:us" ]
image-classification
2023-03-28T01:27:06Z
--- license: apache-2.0 library_name: timm tags: - image-classification - timm datasets: - imagenet-1k --- # Model card for deit3_small_patch16_384.fb_in1k A DeiT-III image classification model. Trained on ImageNet-1k by paper authors. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 22.2 - GMACs: 15.5 - Activations (M): 50.8 - Image size: 384 x 384 - **Papers:** - DeiT III: Revenge of the ViT: https://arxiv.org/abs/2204.07118 - **Original:** https://github.com/facebookresearch/deit - **Dataset:** ImageNet-1k ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('deit3_small_patch16_384.fb_in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'deit3_small_patch16_384.fb_in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 577, 384) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). ## Citation ```bibtex @article{Touvron2022DeiTIR, title={DeiT III: Revenge of the ViT}, author={Hugo Touvron and Matthieu Cord and Herve Jegou}, journal={arXiv preprint arXiv:2204.07118}, year={2022}, } ``` ```bibtex @misc{rw2019timm, author = {Ross Wightman}, title = {PyTorch Image Models}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, doi = {10.5281/zenodo.4414861}, howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} } ```
timm/darknet53.c2ns_in1k
timm
2024-02-10T23:42:45Z
637
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "arxiv:2110.00476", "arxiv:1804.02767", "license:apache-2.0", "region:us" ]
image-classification
2023-04-12T20:40:18Z
--- license: apache-2.0 library_name: timm tags: - image-classification - timm --- # Model card for darknet53.c2ns_in1k A DarkNet image classification model. Trained on ImageNet-1k in `timm` using recipe template described below. Recipe details: * Based on [ResNet Strikes Back](https://arxiv.org/abs/2110.00476) `C` recipes w/o repeat-aug and stronger mixup * SGD (w/ Nesterov) optimizer and AGC (adaptive gradient clipping) * No stochastic depth used in this `ns` variation of the recipe * Cosine LR schedule with warmup ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 41.6 - GMACs: 9.3 - Activations (M): 12.4 - Image size: train = 256 x 256, test = 288 x 288 - **Papers:** - YOLOv3: An Incremental Improvement: https://arxiv.org/abs/1804.02767 - ResNet strikes back: An improved training procedure in timm: https://arxiv.org/abs/2110.00476 - **Original:** https://github.com/huggingface/pytorch-image-models ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('darknet53.c2ns_in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Feature Map Extraction ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'darknet53.c2ns_in1k', pretrained=True, features_only=True, ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 32, 256, 256]) # torch.Size([1, 64, 128, 128]) # torch.Size([1, 128, 64, 64]) # torch.Size([1, 256, 32, 32]) # torch.Size([1, 512, 16, 16]) # torch.Size([1, 1024, 8, 8]) print(o.shape) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'darknet53.c2ns_in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 1024, 8, 8) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). ## Citation ```bibtex @article{Redmon2018YOLOv3AI, title={YOLOv3: An Incremental Improvement}, author={Joseph Redmon and Ali Farhadi}, journal={ArXiv}, year={2018}, volume={abs/1804.02767} } ``` ```bibtex @inproceedings{wightman2021resnet, title={ResNet strikes back: An improved training procedure in timm}, author={Wightman, Ross and Touvron, Hugo and Jegou, Herve}, booktitle={NeurIPS 2021 Workshop on ImageNet: Past, Present, and Future} } ``` ```bibtex @misc{rw2019timm, author = {Ross Wightman}, title = {PyTorch Image Models}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, doi = {10.5281/zenodo.4414861}, howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} } ```
TheBloke/Mythical-Destroyer-L2-13B-GGUF
TheBloke
2023-09-27T12:46:37Z
637
6
transformers
[ "transformers", "gguf", "llama", "en", "base_model:Sao10K/Mythical-Destroyer-L2-13B", "license:llama2", "text-generation-inference", "region:us" ]
null
2023-08-29T14:32:30Z
--- language: - en license: llama2 model_name: Mythical Destroyer L2 13B base_model: Sao10K/Mythical-Destroyer-L2-13B inference: false model_creator: Sao10K model_type: llama prompt_template: 'Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ' quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Mythical Destroyer L2 13B - GGUF - Model creator: [Sao10K](https://huggingface.co/Sao10K) - Original model: [Mythical Destroyer L2 13B](https://huggingface.co/Sao10K/Mythical-Destroyer-L2-13B) <!-- description start --> ## Description This repo contains GGUF format model files for [Sao10K's Mythical Destroyer L2 13B](https://huggingface.co/Sao10K/Mythical-Destroyer-L2-13B). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. GGUF offers numerous advantages over GGML, such as better tokenisation, and support for special tokens. It is also supports metadata, and is designed to be extensible. Here is an incomplate list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. <!-- README_GGUF.md-about-gguf end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF) * [Sao10K's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Sao10K/Mythical-Destroyer-L2-13B) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Alpaca ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` <!-- prompt-template end --> <!-- compatibility_gguf start --> ## Compatibility These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) They are also compatible with many third party UIs and libraries - please see the list at the top of this README. ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-provided-files start --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [mythical-destroyer-l2-13b.Q2_K.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes | | [mythical-destroyer-l2-13b.Q3_K_S.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss | | [mythical-destroyer-l2-13b.Q3_K_M.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss | | [mythical-destroyer-l2-13b.Q3_K_L.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss | | [mythical-destroyer-l2-13b.Q4_0.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M | | [mythical-destroyer-l2-13b.Q4_K_S.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| 9.91 GB | small, greater quality loss | | [mythical-destroyer-l2-13b.Q4_K_M.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended | | [mythical-destroyer-l2-13b.Q5_0.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M | | [mythical-destroyer-l2-13b.Q5_K_S.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended | | [mythical-destroyer-l2-13b.Q5_K_M.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended | | [mythical-destroyer-l2-13b.Q6_K.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss | | [mythical-destroyer-l2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF/blob/main/mythical-destroyer-l2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. <!-- README_GGUF.md-provided-files end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: - LM Studio - LoLLMS Web UI - Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: TheBloke/Mythical-Destroyer-L2-13B-GGUF and below it, a specific filename to download, such as: mythical-destroyer-l2-13b.q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub>=0.17.1 ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download TheBloke/Mythical-Destroyer-L2-13B-GGUF mythical-destroyer-l2-13b.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download TheBloke/Mythical-Destroyer-L2-13B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Mythical-Destroyer-L2-13B-GGUF mythical-destroyer-l2-13b.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows CLI users: Use `set HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1` before running the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 32 -m mythical-destroyer-l2-13b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 4096` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. ### How to load this model from Python using ctransformers #### First install the package ```bash # Base ctransformers with no GPU acceleration pip install ctransformers>=0.2.24 # Or with CUDA GPU acceleration pip install ctransformers[cuda]>=0.2.24 # Or with ROCm GPU acceleration CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers # Or with Metal GPU acceleration for macOS systems CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers ``` #### Simple example code to load one of these GGUF models ```python from ctransformers import AutoModelForCausalLM # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = AutoModelForCausalLM.from_pretrained("TheBloke/Mythical-Destroyer-L2-13B-GGUF", model_file="mythical-destroyer-l2-13b.q4_K_M.gguf", model_type="llama", gpu_layers=50) print(llm("AI is going to")) ``` ## How to use with LangChain Here's guides on using llama-cpp-python or ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> <!-- original-model-card start --> # Original model card: Sao10K's Mythical Destroyer L2 13B **THEBLOKE HAS QUANTS!** <br>https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GPTQ <br>https://huggingface.co/TheBloke/Mythical-Destroyer-L2-13B-GGUF <br>A Merge done for @dampf **FULL FP16 Model** <br>Base Model [TheBloke/Llama-2-13B-fp16](https://huggingface.co/TheBloke/Llama-2-13B-fp16) <br> **MERGED WITH** <br>-----[Gryphe/MythoMax-L2-13b](https://huggingface.co/Gryphe/MythoMax-L2-13b) <br>-----[totally-not-an-llm/PuddleJumper-13b](https://huggingface.co/totally-not-an-llm/PuddleJumper-13b) <br>-----[TheBloke/Llama-2-13B-Chat-fp16](https://huggingface.co/TheBloke/Llama-2-13B-Chat-fp16) <br>-----[rombodawg/LosslessMegaCoder-llama2-13b-mini](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini) <br>-----[The-Face-Of-Goonery/Chronos-Beluga-v2-13bfp16](https://huggingface.co/The-Face-Of-Goonery/Chronos-Beluga-v2-13bfp16) <br>*using ties-merge* ``` Dampf's Rationale: if you think about it, the merges kinda act as experts in my destroyer. mythomax and chronos-beluga for creativity, llama 2 13b chat and puddlejumper for instruct and losslessmegacoder for logic/code if this works well... it should be really, really good --- mythical destroyer will be used for rp and instruct as well as coding tasks a like and it should be good at everything --- ``` <br>Script used to Merge [here](https://github.com/cg123/ties-merge) <br>Thank you for the easy to set up script, [Chargoddard](https://huggingface.co/chargoddard) ! Command: ``` python ties_merge.py TheBloke/Llama-2-13B-fp16 ./Mythical-Destroyer-13B --merge Gryphe/MythoMax-L2-13b --merge totally-not-an-llm/PuddleJumper-13b --merge TheBloke/Llama-2-13B-Chat-fp16 --merge rombodawg/LosslessMegaCoder-llama2-13b-mini --merge The-Face-Of-Goonery/Chronos-Beluga-v2-13bfp16 --cuda ``` <!-- original-model-card end -->
PassionFriend/5EqhZvE4gBzLXnuZUaZ4JEVt25LUoMKvMzAPdG8UpgBFMiny_vgg
PassionFriend
2024-03-01T06:38:11Z
637
0
keras
[ "keras", "region:us" ]
null
2024-02-09T20:21:53Z
Entry not found
Nexusflow/Starling-RM-34B
Nexusflow
2024-04-03T22:22:22Z
637
70
transformers
[ "transformers", "safetensors", "llama", "en", "dataset:berkeley-nest/Nectar", "arxiv:2203.02155", "arxiv:2301.11270", "license:apache-2.0", "endpoints_compatible", "text-generation-inference", "region:us" ]
null
2024-02-22T06:05:37Z
--- license: apache-2.0 datasets: - berkeley-nest/Nectar language: - en --- # Starling-RM-34B <!-- Provide a quick summary of what the model is/does. --> Starling-RM-34B is a reward model trained from [Yi-34B-Chat](https://huggingface.co/01-ai/Yi-34B-Chat). Following the method of training reward model in [the instructGPT paper](https://arxiv.org/abs/2203.02155), we remove the last layer of Yi-34B-Chat, and concatenate a linear layer that outputs scalar for any pair of input prompt and response. We train the reward model with preference dataset [berkeley-nest/Nectar](https://huggingface.co/datasets/berkeley-nest/Nectar), with the K-wise maximum likelihood estimator proposed in [this paper](https://arxiv.org/abs/2301.11270). The reward model outputs a scalar for any given prompt and response. A response that is more helpful and less harmful will get the highest reward score. Note that since the preference dataset [berkeley-nest/Nectar](https://huggingface.co/datasets/berkeley-nest/Nectar) is based on GPT-4 preference, the reward model is likely to be biased towards GPT-4's own preference, including longer responses and certain response format. For more detailed discussions, please check out our [blog post](https://starling.cs.berkeley.edu), and stay tuned for our upcoming code and paper! - **Developed by:** Banghua Zhu * , Evan Frick * , Tianhao Wu * , Hanlin Zhu and Jiantao Jiao. - **Model type:** Reward Model for RLHF - **License:** Apache-2.0 license under the condition that the dataset is not used to compete with OpenAI - **Finetuned from model:** [Yi-34B-Chat](https://huggingface.co/01-ai/Yi-34B-Chat) ### Model Sources <!-- Provide the basic links for the model. --> - **Blog:** https://starling.cs.berkeley.edu/ ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> Please use the following code for inference with the reward model. ```python import os import torch from torch import nn from transformers import AutoTokenizer, LlamaPreTrainedModel,LlamaModel import math ## Define the reward model function class class LlamaForSequenceClassification(LlamaPreTrainedModel): def __init__(self, config): super().__init__(config) self.transformer = LlamaModel(config) self.v_head = nn.Linear(config.hidden_size, 1, bias=False) self.PAD_ID = 0 # Initialize weights and apply final processing self.post_init() def get_device(self): return self.transformer.device def forward( self, input_ids=None, past_key_values=None, attention_mask=None, position_ids=None, ): transformer_outputs = self.transformer( input_ids, attention_mask=attention_mask, position_ids=position_ids, output_hidden_states=True, ) hidden_states = transformer_outputs.hidden_states[-1] scores = [] rewards = self.v_head(hidden_states).squeeze(-1) bs = int(input_ids.shape[0]) for i in range(bs): c_inds = (input_ids[i] == self.PAD_ID).nonzero() c_ind = c_inds[0].item() if len(c_inds) > 0 else input_ids.shape[1] scores.append(rewards[i, c_ind - 1]) scores = torch.stack(scores) return {"scores": scores} ## Load the model and tokenizer reward_model = LlamaForSequenceClassification.from_pretrained("Nexusflow/Starling-RM-34B",torch_dtype=torch.bfloat16) reward_tokenizer = AutoTokenizer.from_pretrained("01-ai/Yi-34B-Chat") reward_tokenizer.truncation_side = "left" reward_model.eval().requires_grad_(False) ## Define the reward function reward_device = "cpu" reward_batch_size = 1 def get_reward(samples): """samples: List[str]""" input_ids = [] attention_masks = [] encodings_dict = reward_tokenizer( samples, truncation=True, max_length=2048, padding="max_length", return_tensors="pt", ).to(reward_device) input_ids = encodings_dict["input_ids"] attention_masks = encodings_dict["attention_mask"] mbs = reward_batch_size out = [] for i in range(math.ceil(len(samples) / mbs)): rewards = reward_model(input_ids=input_ids[i * mbs : (i + 1) * mbs], attention_mask=attention_masks[i * mbs : (i + 1) * mbs]) out.extend(rewards["scores"]) return torch.hstack(out) ## Inference over test prompts with Yi chat template test_sample = ["<|im_start|>user\nHello!<|im_end|>\n<|im_start|>assistant\nHi, how can I help you?<|im_end|>"] reward_for_test_sample = get_reward(test_sample) print(reward_for_test_sample) ``` ## Metrics ### Accuracy Metrics | Model | Human Preference | Truth Preference | Safety Preference | Average | |----------------------|------------------|------------------|-------------------|--------------| | Starling-RM-7B-alpha | 0.762 | 0.684 | 0.767 | 0.738 | | Starling-RM-34B | **0.807** | **0.712** | **0.782** | **0.767** | | | | | | | Starling-RM-34B improves over Starling-RM-7B-alpha in *every metric* we benchmarked. Accuracy is measured as the rate in which the better response receives a higher score than the worse response. In the case of more than 2 responses, the accuracy is the average of the accuracy for each possible pairing. The Human Preference benchmark is measured with [LMSYS's Chatbot Arena Conversations](https://huggingface.co/datasets/lmsys/chatbot_arena_conversations), where the winning model's response is considered the better response. The Truth Preference benchmark is measured with the [Truthful QA](https://huggingface.co/datasets/truthful_qa) dataset, where we expect reward(best_answer) >= reward(correct_answer) > reward(incorrect_answer). The Safety Preference benchmark is measured with [PKU's Safe-RLHF](https://huggingface.co/datasets/PKU-Alignment/PKU-SafeRLHF) dataset. On datapoints with one safe response and one unsafe response, we expect the safe response to always have higher reward. For all benchmarks, we subsample down to <= 1000 prompts. ## License The dataset, model and online demo is a research preview intended for non-commercial use only, subject to the [Yi License](https://huggingface.co/01-ai/Yi-34B-Chat/blob/main/LICENSE), OpenAI data generation [Terms of Use](https://openai.com/policies/terms-of-use), and [ShareGPT Privacy Practices](https://chrome.google.com/webstore/detail/sharegpt-share-your-chatg/daiacboceoaocpibfodeljbdfacokfjb). Please contact us if you find any potential violation. ## Acknowledgment We would like to thank Nexusflow.ai for the assistance with compute which made these efforts possible. We would like to thank the [LMSYS Organization](https://lmsys.org/) for their support of [lmsys-chat-1M](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) dataset, evaluation and online demo. We would like to thank the open source community for their efforts in providing the datasets and base models we used to develope the project, including but not limited to Anthropic, Llama, Mistral, Hugging Face H4, LMSYS, OpenChat, OpenBMB, Flan and ShareGPT. ## Citation ``` @misc{starling2023, title = {Starling-7B: Improving LLM Helpfulness & Harmlessness with RLAIF}, url = {}, author = {Zhu, Banghua and Frick, Evan and Wu, Tianhao and Zhu, Hanlin and Jiao, Jiantao}, month = {November}, year = {2023} } ```
ChristianAzinn/gist-large-embedding-v0-gguf
ChristianAzinn
2024-04-07T22:18:56Z
637
0
sentence-transformers
[ "sentence-transformers", "gguf", "feature-extraction", "mteb", "sentence-similarity", "bert", "en", "arxiv:2402.16829", "arxiv:2212.09741", "base_model:avsolatorio/gist-large-embedding-v0", "license:mit", "autotrain_compatible", "region:us" ]
feature-extraction
2024-04-07T20:14:27Z
--- base_model: avsolatorio/gist-large-embedding-v0 inference: false language: - en license: mit model_creator: avsolatorio model_name: gist-large-embedding-v0 model_type: bert quantized_by: ChristianAzinn library_name: sentence-transformers pipeline_tag: feature-extraction tags: - feature-extraction - mteb - sentence-similarity - sentence-transformers - bert - gguf --- # gist-large-embedding-v0-gguf Model creator: [avsolatorio](https://huggingface.co/avsolatorio) Original model: [gist-large-embedding-v0](https://huggingface.co/avsolatorio/gist-large-embedding-v0) ## Original Description The model is fine-tuned on top of the [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) using the [MEDI dataset](https://github.com/xlang-ai/instructor-embedding.git) augmented with mined triplets from the [MTEB Classification](https://huggingface.co/mteb) training dataset (excluding data from the Amazon Polarity Classification task). The model does not require any instruction for generating embeddings. This means that queries for retrieval tasks can be directly encoded without crafting instructions. Technical paper: [GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning](https://arxiv.org/abs/2402.16829) # Data The dataset used is a compilation of the MEDI and MTEB Classification training datasets. Third-party datasets may be subject to additional terms and conditions under their associated licenses. A HuggingFace Dataset version of the compiled dataset, and the specific revision used to train the model, is available: - Dataset: [avsolatorio/medi-data-mteb_avs_triplets](https://huggingface.co/datasets/avsolatorio/medi-data-mteb_avs_triplets) - Revision: 238a0499b6e6b690cc64ea56fde8461daa8341bb The dataset contains a `task_type` key, which can be used to select only the mteb classification tasks (prefixed with `mteb_`). The **MEDI Dataset** is published in the following paper: [One Embedder, Any Task: Instruction-Finetuned Text Embeddings](https://arxiv.org/abs/2212.09741). The MTEB Benchmark results of the GIST embedding model, compared with the base model, suggest that the fine-tuning dataset has perturbed the model considerably, which resulted in significant improvements in certain tasks while adversely degrading performance in some. The retrieval performance for the TRECCOVID task is of note. The fine-tuning dataset does not contain significant knowledge about COVID-19, which could have caused the observed performance degradation. We found some evidence, detailed in the paper, that thematic coverage of the fine-tuning data can affect downstream performance. ## Description This repo contains GGUF format files for the gist-large-embedding-v0 embedding model. These files were converted and quantized with llama.cpp [PR 5500](https://github.com/ggerganov/llama.cpp/pull/5500), commit [34aa045de](https://github.com/ggerganov/llama.cpp/pull/5500/commits/34aa045de44271ff7ad42858c75739303b8dc6eb), on a consumer RTX 4090. This model supports up to 512 tokens of context. ## Compatibility These files are compatible with [llama.cpp](https://github.com/ggerganov/llama.cpp) as of commit [4524290e8](https://github.com/ggerganov/llama.cpp/commit/4524290e87b8e107cc2b56e1251751546f4b9051), as well as [LM Studio](https://lmstudio.ai/) as of version 0.2.19. # Meta-information ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> ## Provided Files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | Name | Quant method | Bits | Size | Use case | | [gist-large-embedding-v0.Q2_K.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q2_K.gguf) | Q2_K | 2 | 144 MB | smallest, significant quality loss - not recommended for most purposes | | [gist-large-embedding-v0.Q3_K_S.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q3_K_S.gguf) | Q3_K_S | 3 | 160 MB | very small, high quality loss | | [gist-large-embedding-v0.Q3_K_M.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q3_K_M.gguf) | Q3_K_M | 3 | 181 MB | very small, high quality loss | | [gist-large-embedding-v0.Q3_K_L.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q3_K_L.gguf) | Q3_K_L | 3 | 198 MB | small, substantial quality loss | | [gist-large-embedding-v0.Q4_0.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q4_0.gguf) | Q4_0 | 4 | 200 MB | legacy; small, very high quality loss - prefer using Q3_K_M | | [gist-large-embedding-v0.Q4_K_S.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q4_K_S.gguf) | Q4_K_S | 4 | 203 MB | small, greater quality loss | | [gist-large-embedding-v0.Q4_K_M.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q4_K_M.gguf) | Q4_K_M | 4 | 216 MB | medium, balanced quality - recommended | | [gist-large-embedding-v0.Q5_0.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q5_0.gguf) | Q5_0 | 5 | 237 MB | legacy; medium, balanced quality - prefer using Q4_K_M | | [gist-large-embedding-v0.Q5_K_S.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q5_K_S.gguf) | Q5_K_S | 5 | 237 MB | large, low quality loss - recommended | | [gist-large-embedding-v0.Q5_K_M.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q5_K_M.gguf) | Q5_K_M | 5 | 246 MB | large, very low quality loss - recommended | | [gist-large-embedding-v0.Q6_K.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q6_K.gguf) | Q6_K | 6 | 278 MB | very large, extremely low quality loss | | [gist-large-embedding-v0.Q8_0.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0.Q8_0.gguf) | Q8_0 | 8 | 358 MB | very large, extremely low quality loss - recommended | | [gist-large-embedding-v0.Q8_0.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0_fp16.gguf) | FP16 | 16 | 670 MB | enormous, pretty much the original model - not recommended | | [gist-large-embedding-v0.Q8_0.gguf](https://huggingface.co/ChristianAzinn/gist-large-embedding-v0-gguf/blob/main/gist-large-embedding-v0_fp32.gguf) | FP32 | 32 | 1.34 GB | enormous, pretty much the original model - not recommended | # Examples ## Example Usage with `llama.cpp` To compute a single embedding, build llama.cpp and run: ```shell ./embedding -ngl 99 -m [filepath-to-gguf].gguf -p 'search_query: What is TSNE?' ``` You can also submit a batch of texts to embed, as long as the total number of tokens does not exceed the context length. Only the first three embeddings are shown by the `embedding` example. `texts.txt`: ``` search_query: What is TSNE? search_query: Who is Laurens Van der Maaten? ``` Compute multiple embeddings: ```shell ./embedding -ngl 99 -m [filepath-to-gguf].gguf -f texts.txt ``` ## Example Usage with LM Studio Download the 0.2.19 beta build from here: [Windows](https://releases.lmstudio.ai/windows/0.2.19/beta/LM-Studio-0.2.19-Setup-Preview-1.exe) [MacOS](https://releases.lmstudio.ai/mac/arm64/0.2.19/beta/LM-Studio-darwin-arm64-0.2.19-Preview-1.zip) [Linux](https://releases.lmstudio.ai/linux/0.2.19/beta/LM_Studio-0.2.19-Preview-1.AppImage) Once installed, open the app. The home should look like this: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/QGkYvH242S0c_clPqX9Ip.png) Search for either "ChristianAzinn" in the main search bar or go to the "Search" tab on the left menu and search the name there. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/11hLos1JNMyZ1q2K9ICss.png) Select your model from those that appear (this example uses `bge-small-en-v1.5-gguf`) and select which quantization you want to download. Since this model is pretty small, I recommend Q8_0, if not f16/32. Generally, the lower you go in the list (or the bigger the number gets), the larger the file and the better the performance. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/hu9DuVYahQ-QpII5P8mVD.png) You will see a green checkmark and the word "Downloaded" once the model has successfully downloaded, which can take some time depending on your network speeds. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/7fmXkLDmGTNVyG3oqB4--.png) Once this model is finished downloading, navigate to the "Local Server" tab on the left menu and open the loader for text embedding models. This loader does not appear before version 0.2.19, so ensure you downloaded the correct version. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/OrzvqQIhB9p-aMq2G6Lxd.png) Select the model you just downloaded from the dropdown that appears to load it. You may need to play with configuratios in the right-side menu, such as GPU offload if it doesn't fit entirely into VRAM. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/TM4dO4DFP1xqZD1GWBqeI.png) All that's left to do is to hit the "Start Server" button: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/6TZvnX84rZKZ0TwVVLFnw.png) And if you see text like that shown below in the console, you're good to go! You can use this as a drop-in replacement for the OpenAI embeddings API in any application that requires it, or you can query the endpoint directly to test it out. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6584f042b378d311dccea501/kD47WaH-tzpr4qaAm-pMn.png) Example curl request to the API endpoint: ```shell curl http://localhost:1234/v1/embeddings \ -H "Content-Type: application/json" \ -d '{ "input": "Your text string goes here", "model": "model-identifier-here" }' ``` For more information, see the LM Studio [text embedding documentation](https://lmstudio.ai/docs/text-embeddings). ## Acknowledgements Thanks to the LM Studio team and everyone else working on open-source AI. This README is inspired by that of [nomic-ai-embed-text-v1.5-gguf](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5-gguf), another excellent embedding model, and those of the legendary [TheBloke](https://huggingface.co/TheBloke).
LiteLLMs/Meta-Llama-3-70B-Instruct-GGUF
LiteLLMs
2024-04-19T17:28:46Z
637
6
null
[ "gguf", "facebook", "meta", "pytorch", "llama", "llama-3", "GGUF", "text-generation", "en", "license:other", "region:us" ]
text-generation
2024-04-18T23:09:42Z
--- language: - en license: other tags: - facebook - meta - pytorch - llama - llama-3 - GGUF pipeline_tag: text-generation license_name: llama3 license_link: LICENSE extra_gated_prompt: "### META LLAMA 3 COMMUNITY LICENSE AGREEMENT\nMeta Llama 3 Version\ \ Release Date: April 18, 2024\n\"Agreement\" means the terms and conditions for\ \ use, reproduction, distribution and modification of the Llama Materials set forth\ \ herein.\n\"Documentation\" means the specifications, manuals and documentation\ \ accompanying Meta Llama 3 distributed by Meta at https://llama.meta.com/get-started/.\n\ \"Licensee\" or \"you\" means you, or your employer or any other person or entity\ \ (if you are entering into this Agreement on such person or entity’s behalf), of\ \ the age required under applicable laws, rules or regulations to provide legal\ \ consent and that has legal authority to bind your employer or such other person\ \ or entity if you are entering in this Agreement on their behalf.\n\"Meta Llama\ \ 3\" means the foundational large language models and software and algorithms,\ \ including machine-learning model code, trained model weights, inference-enabling\ \ code, training-enabling code, fine-tuning enabling code and other elements of\ \ the foregoing distributed by Meta at https://llama.meta.com/llama-downloads.\n\ \"Llama Materials\" means, collectively, Meta’s proprietary Meta Llama 3 and Documentation\ \ (and any portion thereof) made available under this Agreement.\n\"Meta\" or \"\ we\" means Meta Platforms Ireland Limited (if you are located in or, if you are\ \ an entity, your principal place of business is in the EEA or Switzerland) and\ \ Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).\n\ \ \n1. License Rights and Redistribution.\na. Grant of Rights. You are granted\ \ a non-exclusive, worldwide, non-transferable and royalty-free limited license\ \ under Meta’s intellectual property or other rights owned by Meta embodied in the\ \ Llama Materials to use, reproduce, distribute, copy, create derivative works of,\ \ and make modifications to the Llama Materials.\nb. Redistribution and Use.\ni.\ \ If you distribute or make available the Llama Materials (or any derivative works\ \ thereof), or a product or service that uses any of them, including another AI\ \ model, you shall (A) provide a copy of this Agreement with any such Llama Materials;\ \ and (B) prominently display “Built with Meta Llama 3” on a related website, user\ \ interface, blogpost, about page, or product documentation. If you use the Llama\ \ Materials to create, train, fine tune, or otherwise improve an AI model, which\ \ is distributed or made available, you shall also include “Llama 3” at the beginning\ \ of any such AI model name.\nii. If you receive Llama Materials, or any derivative\ \ works thereof, from a Licensee as part of an integrated end user product, then\ \ Section 2 of this Agreement will not apply to you.\niii. You must retain in all\ \ copies of the Llama Materials that you distribute the following attribution notice\ \ within a “Notice” text file distributed as a part of such copies: “Meta Llama\ \ 3 is licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms,\ \ Inc. All Rights Reserved.”\niv. Your use of the Llama Materials must comply with\ \ applicable laws and regulations (including trade compliance laws and regulations)\ \ and adhere to the Acceptable Use Policy for the Llama Materials (available at\ \ https://llama.meta.com/llama3/use-policy), which is hereby incorporated by reference\ \ into this Agreement.\nv. You will not use the Llama Materials or any output or\ \ results of the Llama Materials to improve any other large language model (excluding\ \ Meta Llama 3 or derivative works thereof).\n2. Additional Commercial Terms. If,\ \ on the Meta Llama 3 version release date, the monthly active users of the products\ \ or services made available by or for Licensee, or Licensee’s affiliates, is greater\ \ than 700 million monthly active users in the preceding calendar month, you must\ \ request a license from Meta, which Meta may grant to you in its sole discretion,\ \ and you are not authorized to exercise any of the rights under this Agreement\ \ unless or until Meta otherwise expressly grants you such rights.\n3. Disclaimer\ \ of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT\ \ AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF\ \ ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,\ \ INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY,\ \ OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING\ \ THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME\ \ ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.\n\ 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER\ \ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY,\ \ OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT,\ \ SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META\ \ OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.\n\ 5. Intellectual Property.\na. No trademark licenses are granted under this Agreement,\ \ and in connection with the Llama Materials, neither Meta nor Licensee may use\ \ any name or mark owned by or associated with the other or any of its affiliates,\ \ except as required for reasonable and customary use in describing and redistributing\ \ the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you\ \ a license to use “Llama 3” (the “Mark”) solely as required to comply with the\ \ last sentence of Section 1.b.i. You will comply with Meta’s brand guidelines (currently\ \ accessible at https://about.meta.com/brand/resources/meta/company-brand/ ). All\ \ goodwill arising out of your use of the Mark will inure to the benefit of Meta.\n\ b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for\ \ Meta, with respect to any derivative works and modifications of the Llama Materials\ \ that are made by you, as between you and Meta, you are and will be the owner of\ \ such derivative works and modifications.\nc. If you institute litigation or other\ \ proceedings against Meta or any entity (including a cross-claim or counterclaim\ \ in a lawsuit) alleging that the Llama Materials or Meta Llama 3 outputs or results,\ \ or any portion of any of the foregoing, constitutes infringement of intellectual\ \ property or other rights owned or licensable by you, then any licenses granted\ \ to you under this Agreement shall terminate as of the date such litigation or\ \ claim is filed or instituted. You will indemnify and hold harmless Meta from and\ \ against any claim by any third party arising out of or related to your use or\ \ distribution of the Llama Materials.\n6. Term and Termination. The term of this\ \ Agreement will commence upon your acceptance of this Agreement or access to the\ \ Llama Materials and will continue in full force and effect until terminated in\ \ accordance with the terms and conditions herein. Meta may terminate this Agreement\ \ if you are in breach of any term or condition of this Agreement. Upon termination\ \ of this Agreement, you shall delete and cease use of the Llama Materials. Sections\ \ 3, 4 and 7 shall survive the termination of this Agreement.\n7. Governing Law\ \ and Jurisdiction. This Agreement will be governed and construed under the laws\ \ of the State of California without regard to choice of law principles, and the\ \ UN Convention on Contracts for the International Sale of Goods does not apply\ \ to this Agreement. The courts of California shall have exclusive jurisdiction\ \ of any dispute arising out of this Agreement.\n### Meta Llama 3 Acceptable Use\ \ Policy\nMeta is committed to promoting safe and fair use of its tools and features,\ \ including Meta Llama 3. If you access or use Meta Llama 3, you agree to this Acceptable\ \ Use Policy (“Policy”). The most recent copy of this policy can be found at [https://llama.meta.com/llama3/use-policy](https://llama.meta.com/llama3/use-policy)\n\ #### Prohibited Uses\nWe want everyone to use Meta Llama 3 safely and responsibly.\ \ You agree you will not use, or allow others to use, Meta Llama 3 to: 1. Violate\ \ the law or others’ rights, including to:\n 1. Engage in, promote, generate,\ \ contribute to, encourage, plan, incite, or further illegal or unlawful activity\ \ or content, such as:\n 1. Violence or terrorism\n 2. Exploitation\ \ or harm to children, including the solicitation, creation, acquisition, or dissemination\ \ of child exploitative content or failure to report Child Sexual Abuse Material\n\ \ 3. Human trafficking, exploitation, and sexual violence\n 4. The\ \ illegal distribution of information or materials to minors, including obscene\ \ materials, or failure to employ legally required age-gating in connection with\ \ such information or materials.\n 5. Sexual solicitation\n 6. Any\ \ other criminal activity\n 2. Engage in, promote, incite, or facilitate the\ \ harassment, abuse, threatening, or bullying of individuals or groups of individuals\n\ \ 3. Engage in, promote, incite, or facilitate discrimination or other unlawful\ \ or harmful conduct in the provision of employment, employment benefits, credit,\ \ housing, other economic benefits, or other essential goods and services\n 4.\ \ Engage in the unauthorized or unlicensed practice of any profession including,\ \ but not limited to, financial, legal, medical/health, or related professional\ \ practices\n 5. Collect, process, disclose, generate, or infer health, demographic,\ \ or other sensitive personal or private information about individuals without rights\ \ and consents required by applicable laws\n 6. Engage in or facilitate any action\ \ or generate any content that infringes, misappropriates, or otherwise violates\ \ any third-party rights, including the outputs or results of any products or services\ \ using the Llama Materials\n 7. Create, generate, or facilitate the creation\ \ of malicious code, malware, computer viruses or do anything else that could disable,\ \ overburden, interfere with or impair the proper working, integrity, operation\ \ or appearance of a website or computer system\n2. Engage in, promote, incite,\ \ facilitate, or assist in the planning or development of activities that present\ \ a risk of death or bodily harm to individuals, including use of Meta Llama 3 related\ \ to the following:\n 1. Military, warfare, nuclear industries or applications,\ \ espionage, use for materials or activities that are subject to the International\ \ Traffic Arms Regulations (ITAR) maintained by the United States Department of\ \ State\n 2. Guns and illegal weapons (including weapon development)\n 3.\ \ Illegal drugs and regulated/controlled substances\n 4. Operation of critical\ \ infrastructure, transportation technologies, or heavy machinery\n 5. Self-harm\ \ or harm to others, including suicide, cutting, and eating disorders\n 6. Any\ \ content intended to incite or promote violence, abuse, or any infliction of bodily\ \ harm to an individual\n3. Intentionally deceive or mislead others, including use\ \ of Meta Llama 3 related to the following:\n 1. Generating, promoting, or furthering\ \ fraud or the creation or promotion of disinformation\n 2. Generating, promoting,\ \ or furthering defamatory content, including the creation of defamatory statements,\ \ images, or other content\n 3. Generating, promoting, or further distributing\ \ spam\n 4. Impersonating another individual without consent, authorization,\ \ or legal right\n 5. Representing that the use of Meta Llama 3 or outputs are\ \ human-generated\n 6. Generating or facilitating false online engagement, including\ \ fake reviews and other means of fake online engagement\n4. Fail to appropriately\ \ disclose to end users any known dangers of your AI system\nPlease report any violation\ \ of this Policy, software “bug,” or other problems that could lead to a violation\ \ of this Policy through one of the following means:\n * Reporting issues with\ \ the model: [https://github.com/meta-llama/llama3](https://github.com/meta-llama/llama3)\n\ \ * Reporting risky content generated by the model:\n developers.facebook.com/llama_output_feedback\n\ \ * Reporting bugs and security concerns: facebook.com/whitehat/info\n * Reporting\ \ violations of the Acceptable Use Policy or unlicensed uses of Meta Llama 3: [email protected]" extra_gated_fields: First Name: text Last Name: text Date of birth: date_picker Country: country Affiliation: text geo: ip_location ? By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy : checkbox extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/). extra_gated_button_content: Submit quantized_by: andrijdavid --- # Meta-Llama-3-70B-Instruct-GGUF - Original model: [Meta-Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct) <!-- description start --> ## Description This repo contains GGUF format model files for [Meta-Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). This is the source project for GGUF, providing both a Command Line Interface (CLI) and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), Known as the most widely used web UI, this project boasts numerous features and powerful extensions, and supports GPU acceleration. * [Ollama](https://github.com/jmorganca/ollama) Ollama is a lightweight and extensible framework designed for building and running language models locally. It features a simple API for creating, managing, and executing models, along with a library of pre-built models for use in various applications​ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), A comprehensive web UI offering GPU acceleration across all platforms and architectures, particularly renowned for storytelling. * [GPT4All](https://gpt4all.io), This is a free and open source GUI that runs locally, supporting Windows, Linux, and macOS with full GPU acceleration. * [LM Studio](https://lmstudio.ai/) An intuitive and powerful local GUI for Windows and macOS (Silicon), featuring GPU acceleration. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui). A notable web UI with a variety of unique features, including a comprehensive model library for easy model selection. * [Faraday.dev](https://faraday.dev/), An attractive, user-friendly character-based chat GUI for Windows and macOS (both Silicon and Intel), also offering GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), A Python library equipped with GPU acceleration, LangChain support, and an OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), A Rust-based ML framework focusing on performance, including GPU support, and designed for ease of use. * [ctransformers](https://github.com/marella/ctransformers), A Python library featuring GPU acceleration, LangChain support, and an OpenAI-compatible AI server. * [localGPT](https://github.com/PromtEngineer/localGPT) An open-source initiative enabling private conversations with documents. <!-- README_GGUF.md-about-gguf end --> <!-- compatibility_gguf start --> ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single folder. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: LiteLLMs/Meta-Llama-3-70B-Instruct-GGUF and below it, a specific filename to download, such as: Q4_0/Q4_0-00001-of-00009.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download LiteLLMs/Meta-Llama-3-70B-Instruct-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download LiteLLMs/Meta-Llama-3-70B-Instruct-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install huggingface_hub[hf_transfer] ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download LiteLLMs/Meta-Llama-3-70B-Instruct-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m Q4_0/Q4_0-00001-of-00009.gguf --color -c 8192 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<PROMPT>" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 8192` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./Q4_0/Q4_0-00001-of-00009.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<PROMPT>", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./Q4_0/Q4_0-00001-of-00009.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer end --> <!-- original-model-card start --> # Original model card: Meta-Llama-3-70B-Instruct ## Model Details Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks. Further, in developing these models, we took great care to optimize helpfulness and safety. **Model developers** Meta **Variations** Llama 3 comes in two sizes — 8B and 70B parameters — in pre-trained and instruction tuned variants. **Input** Models input text only. **Output** Models generate text and code only. **Model Architecture** Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. <table> <tr> <td> </td> <td><strong>Training Data</strong> </td> <td><strong>Params</strong> </td> <td><strong>Context length</strong> </td> <td><strong>GQA</strong> </td> <td><strong>Token count</strong> </td> <td><strong>Knowledge cutoff</strong> </td> </tr> <tr> <td rowspan="2" >Llama 3 </td> <td rowspan="2" >A new mix of publicly available online data. </td> <td>8B </td> <td>8k </td> <td>Yes </td> <td rowspan="2" >15T+ </td> <td>March, 2023 </td> </tr> <tr> <td>70B </td> <td>8k </td> <td>Yes </td> <td>December, 2023 </td> </tr> </table> **Llama 3 family of models**. Token counts refer to pretraining data only. Both the 8 and 70B versions use Grouped-Query Attention (GQA) for improved inference scalability. **Model Release Date** April 18, 2024. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license) Where to send questions or comments about the model Instructions on how to provide feedback or comments on the model can be found in the model [README](https://github.com/meta-llama/llama3). For more technical information about generation parameters and recipes for how to use Llama 3 in applications, please go [here](https://github.com/meta-llama/llama-recipes). ## Intended Use **Intended Use Cases** Llama 3 is intended for commercial and research use in English. Instruction tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. **Out-of-scope** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3 Community License. Use in languages other than English**. **Note: Developers may fine-tune Llama 3 models for languages beyond English provided they comply with the Llama 3 Community License and the Acceptable Use Policy. ## How to use This repository contains two versions of Meta-Llama-3-70B-Instruct, for use with transformers and with the original `llama3` codebase. ### Use with transformers See the snippet below for usage with Transformers: ```python import transformers import torch model_id = "meta-llama/Meta-Llama-3-70B-Instruct" pipeline = transformers.pipeline( "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device="auto", ) messages = [ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"}, {"role": "user", "content": "Who are you?"}, ] prompt = pipeline.tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) terminators = [ pipeline.tokenizer.eos_token_id, pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>") ] outputs = pipeline( prompt, max_new_tokens=256, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(outputs[0]["generated_text"][len(prompt):]) ``` ### Use with `llama3` Please, follow the instructions in the [repository](https://github.com/meta-llama/llama3). To download Original checkpoints, see the example command below leveraging `huggingface-cli`: ``` huggingface-cli download meta-llama/Meta-Llama-3-70B-Instruct --include "original/*" --local-dir Meta-Llama-3-70B-Instruct ``` For Hugging Face support, we recommend using transformers or TGI, but a similar command works. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research SuperCluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint Pretraining utilized a cumulative** 7.7M GPU hours of computation on hardware of type H100-80GB (TDP of 700W). Estimated total emissions were 2290 tCO2eq, 100% of which were offset by Meta’s sustainability program. <table> <tr> <td> </td> <td><strong>Time (GPU hours)</strong> </td> <td><strong>Power Consumption (W)</strong> </td> <td><strong>Carbon Emitted(tCO2eq)</strong> </td> </tr> <tr> <td>Llama 3 8B </td> <td>1.3M </td> <td>700 </td> <td>390 </td> </tr> <tr> <td>Llama 3 70B </td> <td>6.4M </td> <td>700 </td> <td>1900 </td> </tr> <tr> <td>Total </td> <td>7.7M </td> <td> </td> <td>2290 </td> </tr> </table> **CO2 emissions during pre-training**. Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 3 was pretrained on over 15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 10M human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of March 2023 for the 7B and December 2023 for the 70B models respectively. ## Benchmarks In this section, we report the results for Llama 3 models on standard automatic benchmarks. For all the evaluations, we use our internal evaluations library. For details on the methodology see [here](https://github.com/meta-llama/llama3/blob/main/eval_methodology.md). ### Base pretrained models <table> <tr> <td><strong>Category</strong> </td> <td><strong>Benchmark</strong> </td> <td><strong>Llama 3 8B</strong> </td> <td><strong>Llama2 7B</strong> </td> <td><strong>Llama2 13B</strong> </td> <td><strong>Llama 3 70B</strong> </td> <td><strong>Llama2 70B</strong> </td> </tr> <tr> <td rowspan="6" >General </td> <td>MMLU (5-shot) </td> <td>66.6 </td> <td>45.7 </td> <td>53.8 </td> <td>79.5 </td> <td>69.7 </td> </tr> <tr> <td>AGIEval English (3-5 shot) </td> <td>45.9 </td> <td>28.8 </td> <td>38.7 </td> <td>63.0 </td> <td>54.8 </td> </tr> <tr> <td>CommonSenseQA (7-shot) </td> <td>72.6 </td> <td>57.6 </td> <td>67.6 </td> <td>83.8 </td> <td>78.7 </td> </tr> <tr> <td>Winogrande (5-shot) </td> <td>76.1 </td> <td>73.3 </td> <td>75.4 </td> <td>83.1 </td> <td>81.8 </td> </tr> <tr> <td>BIG-Bench Hard (3-shot, CoT) </td> <td>61.1 </td> <td>38.1 </td> <td>47.0 </td> <td>81.3 </td> <td>65.7 </td> </tr> <tr> <td>ARC-Challenge (25-shot) </td> <td>78.6 </td> <td>53.7 </td> <td>67.6 </td> <td>93.0 </td> <td>85.3 </td> </tr> <tr> <td>Knowledge reasoning </td> <td>TriviaQA-Wiki (5-shot) </td> <td>78.5 </td> <td>72.1 </td> <td>79.6 </td> <td>89.7 </td> <td>87.5 </td> </tr> <tr> <td rowspan="4" >Reading comprehension </td> <td>SQuAD (1-shot) </td> <td>76.4 </td> <td>72.2 </td> <td>72.1 </td> <td>85.6 </td> <td>82.6 </td> </tr> <tr> <td>QuAC (1-shot, F1) </td> <td>44.4 </td> <td>39.6 </td> <td>44.9 </td> <td>51.1 </td> <td>49.4 </td> </tr> <tr> <td>BoolQ (0-shot) </td> <td>75.7 </td> <td>65.5 </td> <td>66.9 </td> <td>79.0 </td> <td>73.1 </td> </tr> <tr> <td>DROP (3-shot, F1) </td> <td>58.4 </td> <td>37.9 </td> <td>49.8 </td> <td>79.7 </td> <td>70.2 </td> </tr> </table> ### Instruction tuned models <table> <tr> <td><strong>Benchmark</strong> </td> <td><strong>Llama 3 8B</strong> </td> <td><strong>Llama 2 7B</strong> </td> <td><strong>Llama 2 13B</strong> </td> <td><strong>Llama 3 70B</strong> </td> <td><strong>Llama 2 70B</strong> </td> </tr> <tr> <td>MMLU (5-shot) </td> <td>68.4 </td> <td>34.1 </td> <td>47.8 </td> <td>82.0 </td> <td>52.9 </td> </tr> <tr> <td>GPQA (0-shot) </td> <td>34.2 </td> <td>21.7 </td> <td>22.3 </td> <td>39.5 </td> <td>21.0 </td> </tr> <tr> <td>HumanEval (0-shot) </td> <td>62.2 </td> <td>7.9 </td> <td>14.0 </td> <td>81.7 </td> <td>25.6 </td> </tr> <tr> <td>GSM-8K (8-shot, CoT) </td> <td>79.6 </td> <td>25.7 </td> <td>77.4 </td> <td>93.0 </td> <td>57.5 </td> </tr> <tr> <td>MATH (4-shot, CoT) </td> <td>30.0 </td> <td>3.8 </td> <td>6.7 </td> <td>50.4 </td> <td>11.6 </td> </tr> </table> ### Responsibility & Safety We believe that an open approach to AI leads to better, safer products, faster innovation, and a bigger overall market. We are committed to Responsible AI development and took a series of steps to limit misuse and harm and support the open source community. Foundation models are widely capable technologies that are built to be used for a diverse range of applications. They are not designed to meet every developer preference on safety levels for all use cases, out-of-the-box, as those by their nature will differ across different applications. Rather, responsible LLM-application deployment is achieved by implementing a series of safety best practices throughout the development of such applications, from the model pre-training, fine-tuning and the deployment of systems composed of safeguards to tailor the safety needs specifically to the use case and audience. As part of the Llama 3 release, we updated our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/) to outline the steps and best practices for developers to implement model and system level safety for their application. We also provide a set of resources including [Meta Llama Guard 2](https://llama.meta.com/purple-llama/) and [Code Shield](https://llama.meta.com/purple-llama/) safeguards. These tools have proven to drastically reduce residual risks of LLM Systems, while maintaining a high level of helpfulness. We encourage developers to tune and deploy these safeguards according to their needs and we provide a [reference implementation](https://github.com/meta-llama/llama-recipes/tree/main/recipes/responsible_ai) to get you started. #### Llama 3-Instruct As outlined in the Responsible Use Guide, some trade-off between model helpfulness and model alignment is likely unavoidable. Developers should exercise discretion about how to weigh the benefits of alignment and helpfulness for their specific use case and audience. Developers should be mindful of residual risks when using Llama models and leverage additional safety tools as needed to reach the right safety bar for their use case. <span style="text-decoration:underline;">Safety</span> For our instruction tuned model, we conducted extensive red teaming exercises, performed adversarial evaluations and implemented safety mitigations techniques to lower residual risks. As with any Large Language Model, residual risks will likely remain and we recommend that developers assess these risks in the context of their use case. In parallel, we are working with the community to make AI safety benchmark standards transparent, rigorous and interpretable. <span style="text-decoration:underline;">Refusals</span> In addition to residual risks, we put a great emphasis on model refusals to benign prompts. Over-refusing not only can impact the user experience but could even be harmful in certain contexts as well. We’ve heard the feedback from the developer community and improved our fine tuning to ensure that Llama 3 is significantly less likely to falsely refuse to answer prompts than Llama 2. We built internal benchmarks and developed mitigations to limit false refusals making Llama 3 our most helpful model to date. #### Responsible release In addition to responsible use considerations outlined above, we followed a rigorous process that requires us to take extra measures against misuse and critical risks before we make our release decision. Misuse If you access or use Llama 3, you agree to the Acceptable Use Policy. The most recent copy of this policy can be found at [https://llama.meta.com/llama3/use-policy/](https://llama.meta.com/llama3/use-policy/). #### Critical risks <span style="text-decoration:underline;">CBRNE</span> (Chemical, Biological, Radiological, Nuclear, and high yield Explosives) We have conducted a two fold assessment of the safety of the model in this area: * Iterative testing during model training to assess the safety of responses related to CBRNE threats and other adversarial risks. * Involving external CBRNE experts to conduct an uplift test assessing the ability of the model to accurately provide expert knowledge and reduce barriers to potential CBRNE misuse, by reference to what can be achieved using web search (without the model). ### <span style="text-decoration:underline;">Cyber Security </span> We have evaluated Llama 3 with CyberSecEval, Meta’s cybersecurity safety eval suite, measuring Llama 3’s propensity to suggest insecure code when used as a coding assistant, and Llama 3’s propensity to comply with requests to help carry out cyber attacks, where attacks are defined by the industry standard MITRE ATT&CK cyber attack ontology. On our insecure coding and cyber attacker helpfulness tests, Llama 3 behaved in the same range or safer than models of [equivalent coding capability](https://huggingface.co/spaces/facebook/CyberSecEval). ### <span style="text-decoration:underline;">Child Safety</span> Child Safety risk assessments were conducted using a team of experts, to assess the model’s capability to produce outputs that could result in Child Safety risks and inform on any necessary and appropriate risk mitigations via fine tuning. We leveraged those expert red teaming sessions to expand the coverage of our evaluation benchmarks through Llama 3 model development. For Llama 3, we conducted new in-depth sessions using objective based methodologies to assess the model risks along multiple attack vectors. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences. ### Community Generative AI safety requires expertise and tooling, and we believe in the strength of the open community to accelerate its progress. We are active members of open consortiums, including the AI Alliance, Partnership in AI and MLCommons, actively contributing to safety standardization and transparency. We encourage the community to adopt taxonomies like the MLCommons Proof of Concept evaluation to facilitate collaboration and transparency on safety and content evaluations. Our Purple Llama tools are open sourced for the community to use and widely distributed across ecosystem partners including cloud service providers. We encourage community contributions to our [Github repository](https://github.com/meta-llama/PurpleLlama). Finally, we put in place a set of resources including an [output reporting mechanism](https://developers.facebook.com/llama_output_feedback) and [bug bounty program](https://www.facebook.com/whitehat) to continuously improve the Llama technology with the help of the community. ## Ethical Considerations and Limitations The core values of Llama 3 are openness, inclusivity and helpfulness. It is meant to serve everyone, and to work for a wide range of use cases. It is thus designed to be accessible to people across many different backgrounds, experiences and perspectives. Llama 3 addresses users and their needs as they are, without insertion unnecessary judgment or normativity, while reflecting the understanding that even content that may appear problematic in some cases can serve valuable purposes in others. It respects the dignity and autonomy of all users, especially in terms of the values of free thought and expression that power innovation and progress. But Llama 3 is a new technology, and like any new technology, there are risks associated with its use. Testing conducted to date has been in English, and has not covered, nor could it cover, all scenarios. For these reasons, as with all LLMs, Llama 3’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 3 models, developers should perform safety testing and tuning tailored to their specific applications of the model. As outlined in the Responsible Use Guide, we recommend incorporating [Purple Llama](https://github.com/facebookresearch/PurpleLlama) solutions into your workflows and specifically [Llama Guard](https://ai.meta.com/research/publications/llama-guard-llm-based-input-output-safeguard-for-human-ai-conversations/) which provides a base model to filter input and output prompts to layer system-level safety on top of model-level safety. Please see the Responsible Use Guide available at [http://llama.meta.com/responsible-use-guide](http://llama.meta.com/responsible-use-guide) ## Citation instructions @article{llama3modelcard, title={Llama 3 Model Card}, author={AI@Meta}, year={2024}, url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md} } ## Contributors Aaditya Singh; Aaron Grattafiori; Abhimanyu Dubey; Abhinav Jauhri; Abhinav Pandey; Abhishek Kadian; Adam Kelsey; Adi Gangidi; Ahmad Al-Dahle; Ahuva Goldstand; Aiesha Letman; Ajay Menon; Akhil Mathur; Alan Schelten; Alex Vaughan; Amy Yang; Andrei Lupu; Andres Alvarado; Andrew Gallagher; Andrew Gu; Andrew Ho; Andrew Poulton; Andrew Ryan; Angela Fan; Ankit Ramchandani; Anthony Hartshorn; Archi Mitra; Archie Sravankumar; Artem Korenev; Arun Rao; Ashley Gabriel; Ashwin Bharambe; Assaf Eisenman; Aston Zhang; Aurelien Rodriguez; Austen Gregerson; Ava Spataru; Baptiste Roziere; Ben Maurer; Benjamin Leonhardi; Bernie Huang; Bhargavi Paranjape; Bing Liu; Binh Tang; Bobbie Chern; Brani Stojkovic; Brian Fuller; Catalina Mejia Arenas; Chao Zhou; Charlotte Caucheteux; Chaya Nayak; Ching-Hsiang Chu; Chloe Bi; Chris Cai; Chris Cox; Chris Marra; Chris McConnell; Christian Keller; Christoph Feichtenhofer; Christophe Touret; Chunyang Wu; Corinne Wong; Cristian Canton Ferrer; Damien Allonsius; Daniel Kreymer; Daniel Haziza; Daniel Li; Danielle Pintz; Danny Livshits; Danny Wyatt; David Adkins; David Esiobu; David Xu; Davide Testuggine; Delia David; Devi Parikh; Dhruv Choudhary; Dhruv Mahajan; Diana Liskovich; Diego Garcia-Olano; Diego Perino; Dieuwke Hupkes; Dingkang Wang; Dustin Holland; Egor Lakomkin; Elina Lobanova; Xiaoqing Ellen Tan; Emily Dinan; Eric Smith; Erik Brinkman; Esteban Arcaute; Filip Radenovic; Firat Ozgenel; Francesco Caggioni; Frank Seide; Frank Zhang; Gabriel Synnaeve; Gabriella Schwarz; Gabrielle Lee; Gada Badeer; Georgia Anderson; Graeme Nail; Gregoire Mialon; Guan Pang; Guillem Cucurell; Hailey Nguyen; Hannah Korevaar; Hannah Wang; Haroun Habeeb; Harrison Rudolph; Henry Aspegren; Hu Xu; Hugo Touvron; Iga Kozlowska; Igor Molybog; Igor Tufanov; Iliyan Zarov; Imanol Arrieta Ibarra; Irina-Elena Veliche; Isabel Kloumann; Ishan Misra; Ivan Evtimov; Jacob Xu; Jade Copet; Jake Weissman; Jan Geffert; Jana Vranes; Japhet Asher; Jason Park; Jay Mahadeokar; Jean-Baptiste Gaya; Jeet Shah; Jelmer van der Linde; Jennifer Chan; Jenny Hong; Jenya Lee; Jeremy Fu; Jeremy Teboul; Jianfeng Chi; Jianyu Huang; Jie Wang; Jiecao Yu; Joanna Bitton; Joe Spisak; Joelle Pineau; Jon Carvill; Jongsoo Park; Joseph Rocca; Joshua Johnstun; Junteng Jia; Kalyan Vasuden Alwala; Kam Hou U; Kate Plawiak; Kartikeya Upasani; Kaushik Veeraraghavan; Ke Li; Kenneth Heafield; Kevin Stone; Khalid El-Arini; Krithika Iyer; Kshitiz Malik; Kuenley Chiu; Kunal Bhalla; Kyle Huang; Lakshya Garg; Lauren Rantala-Yeary; Laurens van der Maaten; Lawrence Chen; Leandro Silva; Lee Bell; Lei Zhang; Liang Tan; Louis Martin; Lovish Madaan; Luca Wehrstedt; Lukas Blecher; Luke de Oliveira; Madeline Muzzi; Madian Khabsa; Manav Avlani; Mannat Singh; Manohar Paluri; Mark Zuckerberg; Marcin Kardas; Martynas Mankus; Mathew Oldham; Mathieu Rita; Matthew Lennie; Maya Pavlova; Meghan Keneally; Melanie Kambadur; Mihir Patel; Mikayel Samvelyan; Mike Clark; Mike Lewis; Min Si; Mitesh Kumar Singh; Mo Metanat; Mona Hassan; Naman Goyal; Narjes Torabi; Nicolas Usunier; Nikolay Bashlykov; Nikolay Bogoychev; Niladri Chatterji; Ning Dong; Oliver Aobo Yang; Olivier Duchenne; Onur Celebi; Parth Parekh; Patrick Alrassy; Paul Saab; Pavan Balaji; Pedro Rittner; Pengchuan Zhang; Pengwei Li; Petar Vasic; Peter Weng; Polina Zvyagina; Prajjwal Bhargava; Pratik Dubal; Praveen Krishnan; Punit Singh Koura; Qing He; Rachel Rodriguez; Ragavan Srinivasan; Rahul Mitra; Ramon Calderer; Raymond Li; Robert Stojnic; Roberta Raileanu; Robin Battey; Rocky Wang; Rohit Girdhar; Rohit Patel; Romain Sauvestre; Ronnie Polidoro; Roshan Sumbaly; Ross Taylor; Ruan Silva; Rui Hou; Rui Wang; Russ Howes; Ruty Rinott; Saghar Hosseini; Sai Jayesh Bondu; Samyak Datta; Sanjay Singh; Sara Chugh; Sargun Dhillon; Satadru Pan; Sean Bell; Sergey Edunov; Shaoliang Nie; Sharan Narang; Sharath Raparthy; Shaun Lindsay; Sheng Feng; Sheng Shen; Shenghao Lin; Shiva Shankar; Shruti Bhosale; Shun Zhang; Simon Vandenhende; Sinong Wang; Seohyun Sonia Kim; Soumya Batra; Sten Sootla; Steve Kehoe; Suchin Gururangan; Sumit Gupta; Sunny Virk; Sydney Borodinsky; Tamar Glaser; Tamar Herman; Tamara Best; Tara Fowler; Thomas Georgiou; Thomas Scialom; Tianhe Li; Todor Mihaylov; Tong Xiao; Ujjwal Karn; Vedanuj Goswami; Vibhor Gupta; Vignesh Ramanathan; Viktor Kerkez; Vinay Satish Kumar; Vincent Gonguet; Vish Vogeti; Vlad Poenaru; Vlad Tiberiu Mihailescu; Vladan Petrovic; Vladimir Ivanov; Wei Li; Weiwei Chu; Wenhan Xiong; Wenyin Fu; Wes Bouaziz; Whitney Meers; Will Constable; Xavier Martinet; Xiaojian Wu; Xinbo Gao; Xinfeng Xie; Xuchao Jia; Yaelle Goldschlag; Yann LeCun; Yashesh Gaur; Yasmine Babaei; Ye Qi; Yenda Li; Yi Wen; Yiwen Song; Youngjin Nam; Yuchen Hao; Yuchen Zhang; Yun Wang; Yuning Mao; Yuzi He; Zacharie Delpierre Coudert; Zachary DeVito; Zahra Hankir; Zhaoduo Wen; Zheng Yan; Zhengxing Chen; Zhenyu Yang; Zoe Papakipos <!-- original-model-card end -->
krasserm/gba-planner-7B-completion-only-v0.2-GGUF
krasserm
2024-06-24T12:33:41Z
637
0
null
[ "gguf", "dataset:krasserm/gba-trajectories", "arxiv:2210.03629", "license:apache-2.0", "region:us" ]
null
2024-06-24T11:43:26Z
--- license: apache-2.0 datasets: - krasserm/gba-trajectories --- A planner LLM [fine-tuned on synthetic trajectories](https://krasserm.github.io/2024/05/31/planner-fine-tuning/) from an agent simulation. It can be used in [ReAct](https://arxiv.org/abs/2210.03629)-style LLM agents where [planning is separated from function calling](https://krasserm.github.io/2024/03/06/modular-agent/). Trajectory generation and planner fine-tuning are described in the [bot-with-plan](https://github.com/krasserm/bot-with-plan) project. The planner has been fine-tuned on the [krasserm/gba-trajectories](https://huggingface.co/datasets/krasserm/gba-trajectories) dataset with a [loss over the completion only](https://github.com/krasserm/bot-with-plan/tree/master/train#gba-planner-7b-v02) (i.e. no loss over the prompt). The original QLoRA model is available at [krasserm/gba-planner-7B-completion-only-v0.2](https://huggingface.co/krasserm/gba-planner-7B-completion-only-v0.2). ## Server setup Download model: ```shell mkdir -p models wget https://huggingface.co/krasserm/gba-planner-7B-completion-only-v0.2-GGUF/resolve/main/gba-planner-7B-completion-only-v0.2-Q8_0.gguf?download=true \ -O models/gba-planner-7B-completion-only-v0.2-Q8_0.gguf ``` Start llama.cpp server: ```shell docker run --gpus all --rm -p 8082:8080 -v $(realpath models):/models ghcr.io/ggerganov/llama.cpp:server-cuda--b1-17b291a \ -m /models/gba-planner-7B-completion-only-v0.2-Q8_0.gguf -c 1024 --n-gpu-layers 33 --host 0.0.0.0 --port 8080 ``` ## Usage example Create a `planner` instance on the client side. ```python import json from gba.client import ChatClient, LlamaCppClient, MistralInstruct from gba.planner import FineTunedPlanner from gba.utils import Scratchpad llm = LlamaCppClient(url="http://localhost:8082/completion") model = MistralInstruct(llm=llm) client = ChatClient(model=model) planner = FineTunedPlanner(client=client) ``` Define a user `request` and past task-observation pairs (`scratchpad`) of the current trajectory. ```python request = "Get the average Rotten Tomatoes scores for DreamWorks' last 5 movies." scratchpad = Scratchpad() scratchpad.add( task="Find the last 5 movies released by DreamWorks.", result="The last five movies released by DreamWorks are \"The Bad Guys\" (2022), \"Boss Baby: Family Business\" (2021), \"Trolls World Tour\" (2020), \"Abominable\" (2019), and \"How to Train Your Dragon: The Hidden World\" (2019).") scratchpad.add( task="Search the internet for the Rotten Tomatoes score of \"The Bad Guys\" (2022)", result="The Rotten Tomatoes score of \"The Bad Guys\" (2022) is 88%.", ) ``` Then generate a plan for the next step in the trajectory. ```python result = planner.plan(request=request, scratchpad=scratchpad) print(json.dumps(result.to_dict(), indent=2)) ``` ```json { "context_information_summary": "The last five movies released by DreamWorks are \"The Bad Guys\" (2022), \"Boss Baby: Family Business\" (2021), \"Trolls World Tour\" (2020), \"Abominable\" (2019), and \"How to Train Your Dragon: The Hidden World\" (2019). The Rotten Tomatoes score of \"The Bad Guys\" (2022) is 88%.", "thoughts": "Since we already have the Rotten Tomatoes score for \"The Bad Guys\", the next logical step is to find the scores for the remaining movies in the list, starting with \"Boss Baby: Family Business\".", "task": "Search the internet for the Rotten Tomatoes score of \"Boss Baby: Family Business\" (2021).", "selected_tool": "search_internet" } ``` The planner selects a tool and generates a task for the next step. The task is tool-specific and executed by the tool, in this case the [search_internet](https://github.com/krasserm/bot-with-plan/tree/master/gba/tools/search#search-internet-tool) tool, which results in the next observation on the trajectory. If the `final_answer` tool is selected, a final answer is available or can be generated from the trajectory. The output JSON schema is enforced by the `planner` via [constrained decoding](https://krasserm.github.io/2023/12/18/llm-json-mode/) on the llama.cpp server. ## Tools The planner learned a (static) set of available tools during fine-tuning. These are: | Tool name | Tool description | |--------------------|-------------------------------------------------------------------------------------------| | `ask_user` | Useful for asking user about information missing in the request. | | `calculate_number` | Useful for numerical tasks that result in a single number. | | `create_event` | Useful for adding a single entry to my calendar at given date and time. | | `search_wikipedia` | Useful for searching factual information in Wikipedia. | | `search_internet` | Useful for up-to-date information on the internet. | | `send_email` | Useful for sending an email to a single recipient. | | `use_bash` | Useful for executing commands in a Linux bash. | | `final_answer` | Useful for providing the final answer to a request. Must always be used in the last step. | The framework provided by the [bot-with-plan](https://github.com/krasserm/bot-with-plan) project can easily be adjusted to a different set of tools for specialization to other application domains.
RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf
RichardErkhov
2024-06-29T14:13:25Z
637
0
null
[ "gguf", "region:us" ]
null
2024-06-29T14:07:30Z
Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) Sheared-Pythia-160m-Platypus - GGUF - Model creator: https://huggingface.co/Felladrin/ - Original model: https://huggingface.co/Felladrin/Sheared-Pythia-160m-Platypus/ | Name | Quant method | Size | | ---- | ---- | ---- | | [Sheared-Pythia-160m-Platypus.Q2_K.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q2_K.gguf) | Q2_K | 0.07GB | | [Sheared-Pythia-160m-Platypus.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.IQ3_XS.gguf) | IQ3_XS | 0.08GB | | [Sheared-Pythia-160m-Platypus.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.IQ3_S.gguf) | IQ3_S | 0.08GB | | [Sheared-Pythia-160m-Platypus.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q3_K_S.gguf) | Q3_K_S | 0.08GB | | [Sheared-Pythia-160m-Platypus.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.IQ3_M.gguf) | IQ3_M | 0.08GB | | [Sheared-Pythia-160m-Platypus.Q3_K.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q3_K.gguf) | Q3_K | 0.09GB | | [Sheared-Pythia-160m-Platypus.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q3_K_M.gguf) | Q3_K_M | 0.09GB | | [Sheared-Pythia-160m-Platypus.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q3_K_L.gguf) | Q3_K_L | 0.09GB | | [Sheared-Pythia-160m-Platypus.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.IQ4_XS.gguf) | IQ4_XS | 0.09GB | | [Sheared-Pythia-160m-Platypus.Q4_0.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q4_0.gguf) | Q4_0 | 0.1GB | | [Sheared-Pythia-160m-Platypus.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.IQ4_NL.gguf) | IQ4_NL | 0.1GB | | [Sheared-Pythia-160m-Platypus.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q4_K_S.gguf) | Q4_K_S | 0.1GB | | [Sheared-Pythia-160m-Platypus.Q4_K.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q4_K.gguf) | Q4_K | 0.1GB | | [Sheared-Pythia-160m-Platypus.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q4_K_M.gguf) | Q4_K_M | 0.1GB | | [Sheared-Pythia-160m-Platypus.Q4_1.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q4_1.gguf) | Q4_1 | 0.1GB | | [Sheared-Pythia-160m-Platypus.Q5_0.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q5_0.gguf) | Q5_0 | 0.11GB | | [Sheared-Pythia-160m-Platypus.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q5_K_S.gguf) | Q5_K_S | 0.11GB | | [Sheared-Pythia-160m-Platypus.Q5_K.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q5_K.gguf) | Q5_K | 0.12GB | | [Sheared-Pythia-160m-Platypus.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q5_K_M.gguf) | Q5_K_M | 0.12GB | | [Sheared-Pythia-160m-Platypus.Q5_1.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q5_1.gguf) | Q5_1 | 0.12GB | | [Sheared-Pythia-160m-Platypus.Q6_K.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q6_K.gguf) | Q6_K | 0.13GB | | [Sheared-Pythia-160m-Platypus.Q8_0.gguf](https://huggingface.co/RichardErkhov/Felladrin_-_Sheared-Pythia-160m-Platypus-gguf/blob/main/Sheared-Pythia-160m-Platypus.Q8_0.gguf) | Q8_0 | 0.16GB | Original model description: --- license: cc-by-nc-sa-4.0 base_model: princeton-nlp/Sheared-Pythia-160m datasets: - garage-bAInd/Open-Platypus widget: - text: |- ### User: What are some popular locations for visiting around the world? ### Assistant: - text: |- ### User: How do meteorologists predict how much air pollution will be produced in the next year? ### Assistant: - text: |- ### User: How to become more healthy? ### Assistant: - text: |- ### User: Write the specs of a game about dragons and warriors in a fantasy world. ### Assistant: inference: parameters: max_new_tokens: 64 repetition_penalty: 1.18 --- # Princeton NLP's Sheared-Pythia-160m trained on the Open-Platypus dataset - Base model: [princeton-nlp/Sheared-Pythia-160m](https://huggingface.co/princeton-nlp/Sheared-Pythia-160m) - Dataset: [garage-bAInd/Open-Platypus](https://huggingface.co/datasets/garage-bAInd/Open-Platypus) - Trained with [AutoTrain Advanced](https://github.com/huggingface/autotrain-advanced) using [these parameters](https://huggingface.co/Felladrin/Sheared-Pythia-160m-Platypus/blob/15f1558654269d8d2eebc025dd1e25a389a87828/training_params.json) - Availability in other ML formats: - GGUF: [Felladrin/gguf-Sheared-Pythia-160m-Platypus](https://huggingface.co/Felladrin/gguf-Sheared-Pythia-160m-Platypus) - ONNX: [Felladrin/onnx-Sheared-Pythia-160m-Platypus](https://huggingface.co/Felladrin/onnx-Sheared-Pythia-160m-Platypus) ## Recommended Prompt Format ``` ### User: <message> ### Assistant: ```
surdan/LaBSE_ner_nerel
surdan
2022-04-12T13:17:34Z
636
8
transformers
[ "transformers", "pytorch", "bert", "token-classification", "ru", "en", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
2022-04-11T14:45:16Z
--- language: ["ru", "en"] tasks: - token-classification --- ## About model This model based on [cointegrated/LaBSE-en-ru](https://huggingface.co/cointegrated/LaBSE-en-ru). And trained on [surdan/nerel_short](https://huggingface.co/datasets/surdan/nerel_short) dataset You can find more info: - How the model was trained [Train_model.ipynb](https://huggingface.co/surdan/LaBSE_ner_nerel/blob/main/Train_model.ipynb) - Example of usage model [Inference.ipynb](https://huggingface.co/surdan/LaBSE_ner_nerel/blob/main/Inference.ipynb)
sail-rvc/HomerSimpson2333333
sail-rvc
2023-07-14T07:23:41Z
636
1
transformers
[ "transformers", "rvc", "sail-rvc", "audio-to-audio", "endpoints_compatible", "region:us" ]
audio-to-audio
2023-07-14T07:23:20Z
--- pipeline_tag: audio-to-audio tags: - rvc - sail-rvc --- # HomerSimpson2333333 ## RVC Model ![banner](https://i.imgur.com/xocCjhH.jpg) This model repo was automatically generated. Date: 2023-07-14 07:23:40 Bot Name: juuxnscrap Model Type: RVC Source: https://huggingface.co/juuxn/RVCModels/ Reason: Converting into loadable format for https://github.com/chavinlo/rvc-runpod
goofyai/cyborg_style_xl
goofyai
2023-08-14T16:55:19Z
636
14
diffusers
[ "diffusers", "text-to-image", "stable-diffusion", "lora", "base_model:stabilityai/stable-diffusion-xl-base-1.0", "license:apache-2.0", "region:us" ]
text-to-image
2023-08-14T16:17:39Z
--- license: apache-2.0 tags: - text-to-image - stable-diffusion - lora - diffusers base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: cyborg style, cyborg, android widget: - text: a llama cyborg style --- # Cyborg Style SDXL ## Support me in upgrading my 3060 to a 40xx GPU as my current GPU struggles with SDXL training [Buymeacoffee](https://www.buymeacoffee.com/goofy02) | ![Cyborg](cyborg.jpeg) | ![Dog](dog.png) | |:----------------------:|:----------------:| | ![Skull](skull.jpeg) | ![Wolf](wolf.jpeg) | ### Tips: - Prompt with `cyborg style`, `cyborg` or `android` activation prompts - Lora weight of 0.7-1 works great - Highres fix is highly recommended.
filipealmeida/mpt-7b-instruct-GGUF
filipealmeida
2023-10-05T01:01:48Z
636
0
null
[ "gguf", "Composer", "MosaicML", "llm-foundry", "dataset:mosaicml/dolly_hhrlhf", "arxiv:2205.14135", "arxiv:2108.12409", "arxiv:2010.04245", "license:cc-by-sa-3.0", "region:us" ]
null
2023-10-05T00:17:03Z
--- license: cc-by-sa-3.0 datasets: - mosaicml/dolly_hhrlhf tags: - Composer - MosaicML - llm-foundry inference: false --- # MPT-7B-Instruct <span style="color:red">This is not working yet with the official version of llama.cpp</span> This is the GGUF version of MPT-7B-Instruct based on [jploski's fork of llama.cpp](https://github.com/jploski/llama.cpp) Right now it only works with that branch, but hopefully this will be integrated with the official [llama.cpp](https://github.com/ggerganov/llama.cpp) I needed this for some prototyping so I'll also maintain a fork of the python bindings while this isn't all merged in here: [llama-cpp-python-mpt](https://github.com/filipe-m-almeida/llama-cpp-python-mpt) ----- MPT-7B-Instruct is a model for short-form instruction following. It is built by finetuning [MPT-7B](https://huggingface.co/mosaicml/mpt-7b) on a [dataset](https://huggingface.co/datasets/sam-mosaic/dolly_hhrlhf) derived from the [Databricks Dolly-15k](https://huggingface.co/datasets/databricks/databricks-dolly-15k) and the [Anthropic Helpful and Harmless (HH-RLHF)](https://huggingface.co/datasets/Anthropic/hh-rlhf) datasets. * License: _CC-By-SA-3.0_ * [Demo on Hugging Face Spaces](https://huggingface.co/spaces/mosaicml/mpt-7b-instruct) This model was trained by [MosaicML](https://www.mosaicml.com) and follows a modified decoder-only transformer architecture. ## Model Date May 5, 2023 ## Model License CC-By-SA-3.0 ## Documentation * [Blog post: Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs](https://www.mosaicml.com/blog/mpt-7b) * [Codebase (mosaicml/llm-foundry repo)](https://github.com/mosaicml/llm-foundry/) * Questions: Feel free to contact us via the [MosaicML Community Slack](https://mosaicml.me/slack)! ### Example Question/Instruction **Longboi24**: > What is a quoll? **MPT-7B-Instruct**: >A Quoll (pronounced “cool”) is one of Australia’s native carnivorous marsupial mammals, which are also known as macropods or wallabies in other parts around Asia and South America ## How to Use Note: This model requires that `trust_remote_code=True` be passed to the `from_pretrained` method. This is because we use a custom model architecture that is not yet part of the `transformers` package. It includes options for many training efficiency features such as [FlashAttention (Dao et al. 2022)](https://arxiv.org/pdf/2205.14135.pdf), [ALiBi](https://arxiv.org/abs/2108.12409), QK LayerNorm, and more. ```python import transformers model = transformers.AutoModelForCausalLM.from_pretrained( 'mosaicml/mpt-7b-instruct', trust_remote_code=True ) ``` Note: This model requires that `trust_remote_code=True` be passed to the `from_pretrained` method. This is because we use a custom `MPT` model architecture that is not yet part of the Hugging Face `transformers` package. `MPT` includes options for many training efficiency features such as [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf), [ALiBi](https://arxiv.org/abs/2108.12409), [QK LayerNorm](https://arxiv.org/abs/2010.04245), and more. To use the optimized [triton implementation](https://github.com/openai/triton) of FlashAttention, you can load the model on GPU (`cuda:0`) with `attn_impl='triton'` and with `bfloat16` precision: ```python import torch import transformers name = 'mosaicml/mpt-7b-instruct' config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True) config.attn_config['attn_impl'] = 'triton' config.init_device = 'cuda:0' # For fast initialization directly on GPU! model = transformers.AutoModelForCausalLM.from_pretrained( name, config=config, torch_dtype=torch.bfloat16, # Load model weights in bfloat16 trust_remote_code=True ) ``` Although the model was trained with a sequence length of 2048, ALiBi enables users to increase the maximum sequence length during finetuning and/or inference. For example: ```python import transformers name = 'mosaicml/mpt-7b-instruct' config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True) config.max_seq_len = 4096 # (input + output) tokens can now be up to 4096 model = transformers.AutoModelForCausalLM.from_pretrained( name, config=config, trust_remote_code=True ) ``` This model was trained with the [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) tokenizer. ```python from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b") ``` The model can then be used, for example, within a text-generation pipeline. Note: when running Torch modules in lower precision, it is best practice to use the [torch.autocast context manager](https://pytorch.org/docs/stable/amp.html). ```python from transformers import pipeline pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0') with torch.autocast('cuda', dtype=torch.bfloat16): print( pipe('Here is a recipe for vegan banana bread:\n', max_new_tokens=100, do_sample=True, use_cache=True)) ``` ### Formatting This model was trained on data formatted in the dolly-15k format: ```python INSTRUCTION_KEY = "### Instruction:" RESPONSE_KEY = "### Response:" INTRO_BLURB = "Below is an instruction that describes a task. Write a response that appropriately completes the request." PROMPT_FOR_GENERATION_FORMAT = """{intro} {instruction_key} {instruction} {response_key} """.format( intro=INTRO_BLURB, instruction_key=INSTRUCTION_KEY, instruction="{instruction}", response_key=RESPONSE_KEY, ) example = "James decides to run 3 sprints 3 times a week. He runs 60 meters each sprint. How many total meters does he run a week? Explain before answering." fmt_ex = PROMPT_FOR_GENERATION_FORMAT.format(instruction=example) ``` In the above example, `fmt_ex` is ready to be tokenized and sent through the model. ## Model Description The architecture is a modification of a standard decoder-only transformer. The model has been modified from a standard transformer in the following ways: * It uses [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf) * It uses [ALiBi (Attention with Linear Biases)](https://arxiv.org/abs/2108.12409) and does not use positional embeddings * It does not use biases | Hyperparameter | Value | |----------------|-------| |n_parameters | 6.7B | |n_layers | 32 | | n_heads | 32 | | d_model | 4096 | | vocab size | 50432 | | sequence length | 2048 | ## PreTraining Data For more details on the pretraining process, see [MPT-7B](https://huggingface.co/mosaicml/mpt-7b). The data was tokenized using the [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) tokenizer. ### Training Configuration This model was trained on 8 A100-40GBs for about 2.3 hours using the [MosaicML Platform](https://www.mosaicml.com/platform). The model was trained with sharded data parallelism using [FSDP](https://pytorch.org/docs/stable/fsdp.html) and used the AdamW optimizer. ## Limitations and Biases _The following language is modified from [EleutherAI's GPT-NeoX-20B](https://huggingface.co/EleutherAI/gpt-neox-20b)_ MPT-7B-Instruct can produce factually incorrect output, and should not be relied on to produce factually accurate information. MPT-7B-Instruct was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs. ## Acknowledgements This model was finetuned by Sam Havens and the MosaicML NLP team ## MosaicML Platform If you're interested in [training](https://www.mosaicml.com/training) and [deploying](https://www.mosaicml.com/inference) your own MPT or LLMs on the MosaicML Platform, [sign up here](https://forms.mosaicml.com/demo?utm_source=huggingface&utm_medium=referral&utm_campaign=mpt-7b). ## Disclaimer The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please cosult an attorney before using this model for commercial purposes. ## Citation Please cite this model using the following format: ``` @online{MosaicML2023Introducing, author = {MosaicML NLP Team}, title = {Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs}, year = {2023}, url = {www.mosaicml.com/blog/mpt-7b}, note = {Accessed: 2023-03-28}, % change this date urldate = {2023-03-28} % change this date } ```
Xenova/bge-m3
Xenova
2024-03-21T12:27:12Z
636
20
transformers.js
[ "transformers.js", "onnx", "xlm-roberta", "feature-extraction", "region:us" ]
feature-extraction
2024-02-01T17:02:11Z
--- library_name: transformers.js --- https://huggingface.co/BAAI/bge-m3 with ONNX weights to be compatible with Transformers.js. ## Usage (Transformers.js) If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@xenova/transformers) using: ```bash npm i @xenova/transformers ``` You can then use the model to compute embeddings, as follows: ```js import { pipeline } from '@xenova/transformers'; // Create a feature-extraction pipeline const extractor = await pipeline('feature-extraction', 'Xenova/bge-m3'); // Compute sentence embeddings const texts = ["What is BGE M3?", "Defination of BM25"] const embeddings = await extractor(texts, { pooling: 'cls', normalize: true }); console.log(embeddings); // Tensor { // dims: [ 2, 1024 ], // type: 'float32', // data: Float32Array(2048) [ -0.0340719036757946, -0.04478546231985092, ... ], // size: 2048 // } console.log(embeddings.tolist()); // Convert embeddings to a JavaScript list // [ // [ -0.0340719036757946, -0.04478546231985092, -0.004497686866670847, ... ], // [ -0.015383965335786343, -0.041989751160144806, -0.025820579379796982, ... ] // ] ``` You can also use the model for retrieval. For example: ```js import { pipeline, cos_sim } from '@xenova/transformers'; // Create a feature-extraction pipeline const extractor = await pipeline('feature-extraction', 'Xenova/bge-m3'); // Define query to use for retrieval const query = 'What is BGE M3?'; // List of documents you want to embed const texts = [ 'BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document', ]; // Compute sentence embeddings const embeddings = await extractor(texts, { pooling: 'cls', normalize: true }); // Compute query embeddings const query_embeddings = await extractor(query, { pooling: 'cls', normalize: true }); // Sort by cosine similarity score const scores = embeddings.tolist().map( (embedding, i) => ({ id: i, score: cos_sim(query_embeddings.data, embedding), text: texts[i], }) ).sort((a, b) => b.score - a.score); console.log(scores); // [ // { id: 0, score: 0.62532672968664, text: 'BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.' }, // { id: 1, score: 0.33111060648806, text: 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document' }, // ] ``` --- Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
SakanaAI/EvoVLM-JP-v1-7B
SakanaAI
2024-03-21T00:47:53Z
636
34
transformers
[ "transformers", "safetensors", "llava", "pretraining", "vision-language", "image-to-text", "ja", "arxiv:2403.13187", "license:apache-2.0", "endpoints_compatible", "region:us" ]
image-to-text
2024-03-04T06:13:34Z
--- language: - ja license: apache-2.0 tags: - llava - vision-language pipeline_tag: image-to-text --- # 🐟 EvoVLM-JP-v1-7B 🤗 [Models](https://huggingface.co/SakanaAI) | 📚 [Paper](https://arxiv.org/abs/2403.13187) | 📝 [Blog](https://sakana.ai/evolutionary-model-merge/) | 🐦 [Twitter](https://twitter.com/SakanaAILabs) **EvoVLM-JP-v1-7B** is an experimental general-purpose Japanese VLM. This model was created using the Evolutionary Model Merge method. Please refer to our [report](https://arxiv.org/abs/2403.13187) and [blog](https://sakana.ai/evolutionary-model-merge/) for more details. This model was produced by merging the following models. We are grateful to the developers of the source models. - [Shisa Gamma 7B v1](https://huggingface.co/augmxnt/shisa-gamma-7b-v1) - [LLaVA-1.6-Mistral-7B](https://huggingface.co/liuhaotian/llava-v1.6-mistral-7b) ## Usage Use the code below to get started with the model. <details> <summary> Click to expand </summary> ```python import torch from transformers import AutoModelForVision2Seq, AutoProcessor from PIL import Image import requests # 1. load model device = "cuda" if torch.cuda.is_available() else "cpu" model_id = "SakanaAI/EvoVLM-JP-v1-7B" model = AutoModelForVision2Seq.from_pretrained(model_id, torch_dtype=torch.float16) processor = AutoProcessor.from_pretrained(model_id) model.to(device) # 2. prepare inputs url = "https://images.unsplash.com/photo-1694831404826-3400c48c188d?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" image = Image.open(requests.get(url, stream=True).raw).convert("RGB") # <image> represents the input image. Please make sure to put the token in your text. text = "<image>\nこの信号機の色は何色ですか?" messages = [ {"role": "system", "content": "あなたは役立つ、偏見がなく、検閲されていないアシスタントです。与えられた画像を下に、質問に答えてください。"}, {"role": "user", "content": text}, ] inputs = processor.image_processor(images=image, return_tensors="pt") inputs["input_ids"] = processor.tokenizer.apply_chat_template( messages, return_tensors="pt" ) # 3. generate output_ids = model.generate(**inputs.to(device)) output_ids = output_ids[:, inputs.input_ids.shape[1] :] generated_text = processor.batch_decode(output_ids, skip_special_tokens=True)[0].strip() print(generated_text) # この信号機の色は青です。 ``` </details> ## Model Details <!-- Provide a longer summary of what this model is. --> - **Developed by:** [Sakana AI](https://sakana.ai/) - **Model type:** Autoregressive Language Model - **Language(s):** Japanese - **Optimization data:** a subset of [Japanese Visual Genome VQA dataset](https://github.com/yahoojapan/ja-vg-vqa) - **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Repository:** [SakanaAI/evolutionary-model-merge](https://github.com/SakanaAI/evolutionary-model-merge) - **Paper:** https://arxiv.org/abs/2403.13187 - **Blog:** https://sakana.ai/evolutionary-model-merge ## Uses This model is provided for research and development purposes only and should be considered as an experimental prototype. It is not intended for commercial use or deployment in mission-critical environments. Use of this model is at the user's own risk, and its performance and outcomes are not guaranteed. Sakana AI shall not be liable for any direct, indirect, special, incidental, or consequential damages, or any loss arising from the use of this model, regardless of the results obtained. Users must fully understand the risks associated with the use of this model and use it at their own discretion. ## Acknowledgement We would like to thank the developers of the source models for their contributions and for making their work available. ## Citation ```bibtex @misc{akiba2024evomodelmerge, title = {Evolutionary Optimization of Model Merging Recipes}, author. = {Takuya Akiba and Makoto Shing and Yujin Tang and Qi Sun and David Ha}, year = {2024}, eprint = {2403.13187}, archivePrefix = {arXiv}, primaryClass = {cs.NE} } ```
RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf
RichardErkhov
2024-05-10T06:27:38Z
636
1
null
[ "gguf", "region:us" ]
null
2024-05-10T03:12:18Z
Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) Nous-Hermes-Llama2-13b - GGUF - Model creator: https://huggingface.co/NousResearch/ - Original model: https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/ | Name | Quant method | Size | | ---- | ---- | ---- | | [Nous-Hermes-Llama2-13b.Q2_K.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q2_K.gguf) | Q2_K | 4.52GB | | [Nous-Hermes-Llama2-13b.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.IQ3_XS.gguf) | IQ3_XS | 4.99GB | | [Nous-Hermes-Llama2-13b.IQ3_S.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.IQ3_S.gguf) | IQ3_S | 5.27GB | | [Nous-Hermes-Llama2-13b.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q3_K_S.gguf) | Q3_K_S | 5.27GB | | [Nous-Hermes-Llama2-13b.IQ3_M.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.IQ3_M.gguf) | IQ3_M | 5.57GB | | [Nous-Hermes-Llama2-13b.Q3_K.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q3_K.gguf) | Q3_K | 5.9GB | | [Nous-Hermes-Llama2-13b.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q3_K_M.gguf) | Q3_K_M | 5.9GB | | [Nous-Hermes-Llama2-13b.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q3_K_L.gguf) | Q3_K_L | 6.45GB | | [Nous-Hermes-Llama2-13b.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.IQ4_XS.gguf) | IQ4_XS | 6.54GB | | [Nous-Hermes-Llama2-13b.Q4_0.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q4_0.gguf) | Q4_0 | 6.86GB | | [Nous-Hermes-Llama2-13b.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.IQ4_NL.gguf) | IQ4_NL | 6.9GB | | [Nous-Hermes-Llama2-13b.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q4_K_S.gguf) | Q4_K_S | 6.91GB | | [Nous-Hermes-Llama2-13b.Q4_K.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q4_K.gguf) | Q4_K | 7.33GB | | [Nous-Hermes-Llama2-13b.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q4_K_M.gguf) | Q4_K_M | 7.33GB | | [Nous-Hermes-Llama2-13b.Q4_1.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q4_1.gguf) | Q4_1 | 7.61GB | | [Nous-Hermes-Llama2-13b.Q5_0.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q5_0.gguf) | Q5_0 | 8.36GB | | [Nous-Hermes-Llama2-13b.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q5_K_S.gguf) | Q5_K_S | 8.36GB | | [Nous-Hermes-Llama2-13b.Q5_K.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q5_K.gguf) | Q5_K | 8.6GB | | [Nous-Hermes-Llama2-13b.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q5_K_M.gguf) | Q5_K_M | 8.6GB | | [Nous-Hermes-Llama2-13b.Q5_1.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q5_1.gguf) | Q5_1 | 9.1GB | | [Nous-Hermes-Llama2-13b.Q6_K.gguf](https://huggingface.co/RichardErkhov/NousResearch_-_Nous-Hermes-Llama2-13b-gguf/blob/main/Nous-Hermes-Llama2-13b.Q6_K.gguf) | Q6_K | 9.95GB | Original model description: --- language: - en tags: - llama-2 - self-instruct - distillation - synthetic instruction license: - mit --- # Model Card: Nous-Hermes-Llama2-13b Compute provided by our project sponsor Redmond AI, thank you! Follow RedmondAI on Twitter @RedmondAI. ## Model Description Nous-Hermes-Llama2-13b is a state-of-the-art language model fine-tuned on over 300,000 instructions. This model was fine-tuned by Nous Research, with Teknium and Emozilla leading the fine tuning process and dataset curation, Redmond AI sponsoring the compute, and several other contributors. This Hermes model uses the exact same dataset as Hermes on Llama-1. This is to ensure consistency between the old Hermes and new, for anyone who wanted to keep Hermes as similar to the old one, just more capable. This model stands out for its long responses, lower hallucination rate, and absence of OpenAI censorship mechanisms. The fine-tuning process was performed with a 4096 sequence length on an 8x a100 80GB DGX machine. ## Example Outputs: ![Example4](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example5.png "Example 4") ![Example1](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/Example1.png "Example 1") ![Example2](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example2.png "Example 2") ![Example3](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example3.png "Example 3") ## Model Training The model was trained almost entirely on synthetic GPT-4 outputs. Curating high quality GPT-4 datasets enables incredibly high quality in knowledge, task completion, and style. This includes data from diverse sources such as GPTeacher, the general, roleplay v1&2, code instruct datasets, Nous Instruct & PDACTL (unpublished), and several others, detailed further below ## Collaborators The model fine-tuning and the datasets were a collaboration of efforts and resources between Teknium, Karan4D, Emozilla, Huemin Art, and Redmond AI. Special mention goes to @winglian for assisting in some of the training issues. Huge shoutout and acknowledgement is deserved for all the dataset creators who generously share their datasets openly. Among the contributors of datasets: - GPTeacher was made available by Teknium - Wizard LM by nlpxucan - Nous Research Instruct Dataset was provided by Karan4D and HueminArt. - GPT4-LLM and Unnatural Instructions were provided by Microsoft - Airoboros dataset by jondurbin - Camel-AI's domain expert datasets are from Camel-AI - CodeAlpaca dataset by Sahil 2801. If anyone was left out, please open a thread in the community tab. ## Prompt Format The model follows the Alpaca prompt format: ``` ### Instruction: <prompt> ### Response: <leave a newline blank for model to respond> ``` or ``` ### Instruction: <prompt> ### Input: <additional context> ### Response: <leave a newline blank for model to respond> ``` ## Benchmark Results AGI-Eval ``` | Task |Version| Metric |Value | |Stderr| |agieval_aqua_rat | 0|acc |0.2362|± |0.0267| | | |acc_norm|0.2480|± |0.0272| |agieval_logiqa_en | 0|acc |0.3425|± |0.0186| | | |acc_norm|0.3472|± |0.0187| |agieval_lsat_ar | 0|acc |0.2522|± |0.0287| | | |acc_norm|0.2087|± |0.0269| |agieval_lsat_lr | 0|acc |0.3510|± |0.0212| | | |acc_norm|0.3627|± |0.0213| |agieval_lsat_rc | 0|acc |0.4647|± |0.0305| | | |acc_norm|0.4424|± |0.0303| |agieval_sat_en | 0|acc |0.6602|± |0.0331| | | |acc_norm|0.6165|± |0.0340| |agieval_sat_en_without_passage| 0|acc |0.4320|± |0.0346| | | |acc_norm|0.4272|± |0.0345| |agieval_sat_math | 0|acc |0.2909|± |0.0307| | | |acc_norm|0.2727|± |0.0301| ``` GPT-4All Benchmark Set ``` | Task |Version| Metric |Value | |Stderr| |arc_challenge| 0|acc |0.5102|± |0.0146| | | |acc_norm|0.5213|± |0.0146| |arc_easy | 0|acc |0.7959|± |0.0083| | | |acc_norm|0.7567|± |0.0088| |boolq | 1|acc |0.8394|± |0.0064| |hellaswag | 0|acc |0.6164|± |0.0049| | | |acc_norm|0.8009|± |0.0040| |openbookqa | 0|acc |0.3580|± |0.0215| | | |acc_norm|0.4620|± |0.0223| |piqa | 0|acc |0.7992|± |0.0093| | | |acc_norm|0.8069|± |0.0092| |winogrande | 0|acc |0.7127|± |0.0127| ``` BigBench Reasoning Test ``` | Task |Version| Metric |Value | |Stderr| |bigbench_causal_judgement | 0|multiple_choice_grade|0.5526|± |0.0362| |bigbench_date_understanding | 0|multiple_choice_grade|0.7344|± |0.0230| |bigbench_disambiguation_qa | 0|multiple_choice_grade|0.2636|± |0.0275| |bigbench_geometric_shapes | 0|multiple_choice_grade|0.0195|± |0.0073| | | |exact_str_match |0.0000|± |0.0000| |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.2760|± |0.0200| |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2100|± |0.0154| |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4400|± |0.0287| |bigbench_movie_recommendation | 0|multiple_choice_grade|0.2440|± |0.0192| |bigbench_navigate | 0|multiple_choice_grade|0.4950|± |0.0158| |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.5570|± |0.0111| |bigbench_ruin_names | 0|multiple_choice_grade|0.3728|± |0.0229| |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.1854|± |0.0123| |bigbench_snarks | 0|multiple_choice_grade|0.6298|± |0.0360| |bigbench_sports_understanding | 0|multiple_choice_grade|0.6156|± |0.0155| |bigbench_temporal_sequences | 0|multiple_choice_grade|0.3140|± |0.0147| |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|0.2032|± |0.0114| |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1406|± |0.0083| |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4400|± |0.0287| ``` These are the highest benchmarks Hermes has seen on every metric, achieving the following average scores: - GPT4All benchmark average is now 70.0 - from 68.8 in Hermes-Llama1 - 0.3657 on BigBench, up from 0.328 on hermes-llama1 - 0.372 on AGIEval, up from 0.354 on Hermes-llama1 These benchmarks currently have us at #1 on ARC-c, ARC-e, Hellaswag, and OpenBookQA, and 2nd place on Winogrande, comparing to GPT4all's benchmarking list, supplanting Hermes 1 for the new top position. ## Resources for Applied Use Cases: Check out LM Studio for a nice chatgpt style interface here: https://lmstudio.ai/ For an example of a back and forth chatbot using huggingface transformers and discord, check out: https://github.com/teknium1/alpaca-discord For an example of a roleplaying discord chatbot, check out this: https://github.com/teknium1/alpaca-roleplay-discordbot ## Future Plans We plan to continue to iterate on both more high quality data, and new data filtering techniques to eliminate lower quality data going forward. ## Model Usage The model is available for download on Hugging Face. It is suitable for a wide range of language tasks, from generating creative text to understanding and following complex instructions. [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
PrunaAI/Qwen2-72B-GGUF-smashed
PrunaAI
2024-06-07T22:14:57Z
636
0
null
[ "gguf", "pruna-ai", "region:us" ]
null
2024-06-07T15:03:15Z
--- thumbnail: "https://assets-global.website-files.com/646b351987a8d8ce158d1940/64ec9e96b4334c0e1ac41504_Logo%20with%20white%20text.svg" metrics: - memory_disk - memory_inference - inference_latency - inference_throughput - inference_CO2_emissions - inference_energy_consumption tags: - pruna-ai --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <a href="https://www.pruna.ai/" target="_blank" rel="noopener noreferrer"> <img src="https://i.imgur.com/eDAlcgk.png" alt="PrunaAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </a> </div> <!-- header end --> [![Twitter](https://img.shields.io/twitter/follow/PrunaAI?style=social)](https://twitter.com/PrunaAI) [![GitHub](https://img.shields.io/github/followers/PrunaAI?label=Follow%20%40PrunaAI&style=social)](https://github.com/PrunaAI) [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following) [![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?style=social&logo=discord)](https://discord.com/invite/vb6SmA3hxu) ## This repo contains GGUF versions of the Qwen/Qwen2-72B model. # Simply make AI models cheaper, smaller, faster, and greener! - Give a thumbs up if you like this model! - Contact us and tell us which model to compress next [here](https://www.pruna.ai/contact). - Request access to easily compress your *own* AI models [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai). - Read the documentations to know more [here](https://pruna-ai-pruna.readthedocs-hosted.com/en/latest/) - Join Pruna AI community on Discord [here](https://discord.com/invite/vb6SmA3hxu) to share feedback/suggestions or get help. **Frequently Asked Questions** - ***How does the compression work?*** The model is compressed with GGUF. - ***How does the model quality change?*** The quality of the model output might vary compared to the base model. - ***What is the model format?*** We use GGUF format. - ***What calibration data has been used?*** If needed by the compression method, we used WikiText as the calibration data. - ***How to compress my own models?*** You can request premium access to more compression methods and tech support for your specific use-cases [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai). # Downloading and running the models You can download the individual files from the Files & versions section. Here is a list of the different versions we provide. For more info checkout [this chart](https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9) and [this guide](https://www.reddit.com/r/LocalLLaMA/comments/1ba55rj/overview_of_gguf_quantization_methods/): | Quant type | Description | |------------|--------------------------------------------------------------------------------------------| | Q5_K_M | High quality, recommended. | | Q5_K_S | High quality, recommended. | | Q4_K_M | Good quality, uses about 4.83 bits per weight, recommended. | | Q4_K_S | Slightly lower quality with more space savings, recommended. | | IQ4_NL | Decent quality, slightly smaller than Q4_K_S with similar performance, recommended. | | IQ4_XS | Decent quality, smaller than Q4_K_S with similar performance, recommended. | | Q3_K_L | Lower quality but usable, good for low RAM availability. | | Q3_K_M | Even lower quality. | | IQ3_M | Medium-low quality, new method with decent performance comparable to Q3_K_M. | | IQ3_S | Lower quality, new method with decent performance, recommended over Q3_K_S quant, same size with better performance. | | Q3_K_S | Low quality, not recommended. | | IQ3_XS | Lower quality, new method with decent performance, slightly better than Q3_K_S. | | Q2_K | Very low quality but surprisingly usable. | ## How to download GGUF files ? **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev - **Option A** - Downloading in `text-generation-webui`: - **Step 1**: Under Download Model, you can enter the model repo: Qwen-Qwen2-72B-GGUF-smashed and below it, a specific filename to download, such as: phi-2.IQ3_M.gguf. - **Step 2**: Then click Download. - **Option B** - Downloading on the command line (including multiple files at once): - **Step 1**: We recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` - **Step 2**: Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download Qwen-Qwen2-72B-GGUF-smashed Qwen2-72B.IQ3_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> Alternatively, you can also download multiple files at once with a pattern: ```shell huggingface-cli download Qwen-Qwen2-72B-GGUF-smashed --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download Qwen-Qwen2-72B-GGUF-smashed Qwen2-72B.IQ3_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## How to run model in GGUF format? - **Option A** - Introductory example with `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m Qwen2-72B.IQ3_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<s>[INST] {{prompt\}} [/INST]" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 32768` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) - **Option B** - Running in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20-%20Model%20Tab.md#llamacpp). - **Option C** - Running from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./Qwen2-72B.IQ3_M.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<s>[INST] {{prompt}} [/INST]", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./Qwen2-72B.IQ3_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {{"role": "system", "content": "You are a story writing assistant."}}, {{ "role": "user", "content": "Write a story about llamas." }} ] ) ``` - **Option D** - Running with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) ## Configurations The configuration info are in `smash_config.json`. ## Credits & License The license of the smashed model follows the license of the original model. Please check the license of the original model before using this model which provided the base model. The license of the `pruna-engine` is [here](https://pypi.org/project/pruna-engine/) on Pypi. ## Want to compress other models? - Contact us and tell us which model to compress next [here](https://www.pruna.ai/contact). - Request access to easily compress your own AI models [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai).
razent/SciFive-base-Pubmed
razent
2022-11-27T04:03:08Z
635
4
transformers
[ "transformers", "pytorch", "tf", "t5", "text2text-generation", "token-classification", "text-classification", "question-answering", "text-generation", "en", "dataset:pubmed", "arxiv:2106.03598", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-classification
2022-03-02T23:29:05Z
--- language: - en tags: - token-classification - text-classification - question-answering - text2text-generation - text-generation datasets: - pubmed --- # SciFive Pubmed Base ## Introduction Paper: [SciFive: a text-to-text transformer model for biomedical literature](https://arxiv.org/abs/2106.03598) Authors: _Long N. Phan, James T. Anibal, Hieu Tran, Shaurya Chanana, Erol Bahadroglu, Alec Peltekian, Grégoire Altan-Bonnet_ ## How to use For more details, do check out [our Github repo](https://github.com/justinphan3110/SciFive). ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM ​ tokenizer = AutoTokenizer.from_pretrained("razent/SciFive-base-Pubmed") model = AutoModelForSeq2SeqLM.from_pretrained("razent/SciFive-base-Pubmed") ​ sentence = "Identification of APC2 , a homologue of the adenomatous polyposis coli tumour suppressor ." text = sentence + " </s>" encoding = tokenizer.encode_plus(text, pad_to_max_length=True, return_tensors="pt") input_ids, attention_masks = encoding["input_ids"].to("cuda"), encoding["attention_mask"].to("cuda") outputs = model.generate( input_ids=input_ids, attention_mask=attention_masks, max_length=256, early_stopping=True ) for output in outputs: line = tokenizer.decode(output, skip_special_tokens=True, clean_up_tokenization_spaces=True) print(line) ```
timm/resnet18.gluon_in1k
timm
2024-02-10T23:38:41Z
635
1
timm
[ "timm", "pytorch", "safetensors", "image-classification", "arxiv:1512.03385", "arxiv:1812.01187", "license:apache-2.0", "region:us" ]
image-classification
2023-04-05T18:03:59Z
--- license: apache-2.0 library_name: timm tags: - image-classification - timm --- # Model card for resnet18.gluon_in1k A ResNet-B image classification model. This model features: * ReLU activations * single layer 7x7 convolution with pooling * 1x1 convolution shortcut downsample Trained on ImageNet-1k in Apache Gluon using Bag-of-Tricks based recipes. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 11.7 - GMACs: 1.8 - Activations (M): 2.5 - Image size: 224 x 224 - **Papers:** - Deep Residual Learning for Image Recognition: https://arxiv.org/abs/1512.03385 - Bag of Tricks for Image Classification with Convolutional Neural Networks: https://arxiv.org/abs/1812.01187 - **Original:** https://cv.gluon.ai/model_zoo/classification.html ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('resnet18.gluon_in1k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Feature Map Extraction ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'resnet18.gluon_in1k', pretrained=True, features_only=True, ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 64, 112, 112]) # torch.Size([1, 64, 56, 56]) # torch.Size([1, 128, 28, 28]) # torch.Size([1, 256, 14, 14]) # torch.Size([1, 512, 7, 7]) print(o.shape) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'resnet18.gluon_in1k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 512, 7, 7) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). |model |img_size|top1 |top5 |param_count|gmacs|macts|img/sec| |------------------------------------------|--------|-----|-----|-----------|-----|-----|-------| |[seresnextaa101d_32x8d.sw_in12k_ft_in1k_288](https://huggingface.co/timm/seresnextaa101d_32x8d.sw_in12k_ft_in1k_288)|320 |86.72|98.17|93.6 |35.2 |69.7 |451 | |[seresnextaa101d_32x8d.sw_in12k_ft_in1k_288](https://huggingface.co/timm/seresnextaa101d_32x8d.sw_in12k_ft_in1k_288)|288 |86.51|98.08|93.6 |28.5 |56.4 |560 | |[seresnextaa101d_32x8d.sw_in12k_ft_in1k](https://huggingface.co/timm/seresnextaa101d_32x8d.sw_in12k_ft_in1k)|288 |86.49|98.03|93.6 |28.5 |56.4 |557 | |[seresnextaa101d_32x8d.sw_in12k_ft_in1k](https://huggingface.co/timm/seresnextaa101d_32x8d.sw_in12k_ft_in1k)|224 |85.96|97.82|93.6 |17.2 |34.2 |923 | |[resnext101_32x32d.fb_wsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext101_32x32d.fb_wsl_ig1b_ft_in1k)|224 |85.11|97.44|468.5 |87.3 |91.1 |254 | |[resnetrs420.tf_in1k](https://huggingface.co/timm/resnetrs420.tf_in1k)|416 |85.0 |97.12|191.9 |108.4|213.8|134 | |[ecaresnet269d.ra2_in1k](https://huggingface.co/timm/ecaresnet269d.ra2_in1k)|352 |84.96|97.22|102.1 |50.2 |101.2|291 | |[ecaresnet269d.ra2_in1k](https://huggingface.co/timm/ecaresnet269d.ra2_in1k)|320 |84.73|97.18|102.1 |41.5 |83.7 |353 | |[resnetrs350.tf_in1k](https://huggingface.co/timm/resnetrs350.tf_in1k)|384 |84.71|96.99|164.0 |77.6 |154.7|183 | |[seresnextaa101d_32x8d.ah_in1k](https://huggingface.co/timm/seresnextaa101d_32x8d.ah_in1k)|288 |84.57|97.08|93.6 |28.5 |56.4 |557 | |[resnetrs200.tf_in1k](https://huggingface.co/timm/resnetrs200.tf_in1k)|320 |84.45|97.08|93.2 |31.5 |67.8 |446 | |[resnetrs270.tf_in1k](https://huggingface.co/timm/resnetrs270.tf_in1k)|352 |84.43|96.97|129.9 |51.1 |105.5|280 | |[seresnext101d_32x8d.ah_in1k](https://huggingface.co/timm/seresnext101d_32x8d.ah_in1k)|288 |84.36|96.92|93.6 |27.6 |53.0 |595 | |[seresnet152d.ra2_in1k](https://huggingface.co/timm/seresnet152d.ra2_in1k)|320 |84.35|97.04|66.8 |24.1 |47.7 |610 | |[resnetrs350.tf_in1k](https://huggingface.co/timm/resnetrs350.tf_in1k)|288 |84.3 |96.94|164.0 |43.7 |87.1 |333 | |[resnext101_32x8d.fb_swsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext101_32x8d.fb_swsl_ig1b_ft_in1k)|224 |84.28|97.17|88.8 |16.5 |31.2 |1100 | |[resnetrs420.tf_in1k](https://huggingface.co/timm/resnetrs420.tf_in1k)|320 |84.24|96.86|191.9 |64.2 |126.6|228 | |[seresnext101_32x8d.ah_in1k](https://huggingface.co/timm/seresnext101_32x8d.ah_in1k)|288 |84.19|96.87|93.6 |27.2 |51.6 |613 | |[resnext101_32x16d.fb_wsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext101_32x16d.fb_wsl_ig1b_ft_in1k)|224 |84.18|97.19|194.0 |36.3 |51.2 |581 | |[resnetaa101d.sw_in12k_ft_in1k](https://huggingface.co/timm/resnetaa101d.sw_in12k_ft_in1k)|288 |84.11|97.11|44.6 |15.1 |29.0 |1144 | |[resnet200d.ra2_in1k](https://huggingface.co/timm/resnet200d.ra2_in1k)|320 |83.97|96.82|64.7 |31.2 |67.3 |518 | |[resnetrs200.tf_in1k](https://huggingface.co/timm/resnetrs200.tf_in1k)|256 |83.87|96.75|93.2 |20.2 |43.4 |692 | |[seresnextaa101d_32x8d.ah_in1k](https://huggingface.co/timm/seresnextaa101d_32x8d.ah_in1k)|224 |83.86|96.65|93.6 |17.2 |34.2 |923 | |[resnetrs152.tf_in1k](https://huggingface.co/timm/resnetrs152.tf_in1k)|320 |83.72|96.61|86.6 |24.3 |48.1 |617 | |[seresnet152d.ra2_in1k](https://huggingface.co/timm/seresnet152d.ra2_in1k)|256 |83.69|96.78|66.8 |15.4 |30.6 |943 | |[seresnext101d_32x8d.ah_in1k](https://huggingface.co/timm/seresnext101d_32x8d.ah_in1k)|224 |83.68|96.61|93.6 |16.7 |32.0 |986 | |[resnet152d.ra2_in1k](https://huggingface.co/timm/resnet152d.ra2_in1k)|320 |83.67|96.74|60.2 |24.1 |47.7 |706 | |[resnetrs270.tf_in1k](https://huggingface.co/timm/resnetrs270.tf_in1k)|256 |83.59|96.61|129.9 |27.1 |55.8 |526 | |[seresnext101_32x8d.ah_in1k](https://huggingface.co/timm/seresnext101_32x8d.ah_in1k)|224 |83.58|96.4 |93.6 |16.5 |31.2 |1013 | |[resnetaa101d.sw_in12k_ft_in1k](https://huggingface.co/timm/resnetaa101d.sw_in12k_ft_in1k)|224 |83.54|96.83|44.6 |9.1 |17.6 |1864 | |[resnet152.a1h_in1k](https://huggingface.co/timm/resnet152.a1h_in1k)|288 |83.46|96.54|60.2 |19.1 |37.3 |904 | |[resnext101_32x16d.fb_swsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext101_32x16d.fb_swsl_ig1b_ft_in1k)|224 |83.35|96.85|194.0 |36.3 |51.2 |582 | |[resnet200d.ra2_in1k](https://huggingface.co/timm/resnet200d.ra2_in1k)|256 |83.23|96.53|64.7 |20.0 |43.1 |809 | |[resnext101_32x4d.fb_swsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext101_32x4d.fb_swsl_ig1b_ft_in1k)|224 |83.22|96.75|44.2 |8.0 |21.2 |1814 | |[resnext101_64x4d.c1_in1k](https://huggingface.co/timm/resnext101_64x4d.c1_in1k)|288 |83.16|96.38|83.5 |25.7 |51.6 |590 | |[resnet152d.ra2_in1k](https://huggingface.co/timm/resnet152d.ra2_in1k)|256 |83.14|96.38|60.2 |15.4 |30.5 |1096 | |[resnet101d.ra2_in1k](https://huggingface.co/timm/resnet101d.ra2_in1k)|320 |83.02|96.45|44.6 |16.5 |34.8 |992 | |[ecaresnet101d.miil_in1k](https://huggingface.co/timm/ecaresnet101d.miil_in1k)|288 |82.98|96.54|44.6 |13.4 |28.2 |1077 | |[resnext101_64x4d.tv_in1k](https://huggingface.co/timm/resnext101_64x4d.tv_in1k)|224 |82.98|96.25|83.5 |15.5 |31.2 |989 | |[resnetrs152.tf_in1k](https://huggingface.co/timm/resnetrs152.tf_in1k)|256 |82.86|96.28|86.6 |15.6 |30.8 |951 | |[resnext101_32x8d.tv2_in1k](https://huggingface.co/timm/resnext101_32x8d.tv2_in1k)|224 |82.83|96.22|88.8 |16.5 |31.2 |1099 | |[resnet152.a1h_in1k](https://huggingface.co/timm/resnet152.a1h_in1k)|224 |82.8 |96.13|60.2 |11.6 |22.6 |1486 | |[resnet101.a1h_in1k](https://huggingface.co/timm/resnet101.a1h_in1k)|288 |82.8 |96.32|44.6 |13.0 |26.8 |1291 | |[resnet152.a1_in1k](https://huggingface.co/timm/resnet152.a1_in1k)|288 |82.74|95.71|60.2 |19.1 |37.3 |905 | |[resnext101_32x8d.fb_wsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext101_32x8d.fb_wsl_ig1b_ft_in1k)|224 |82.69|96.63|88.8 |16.5 |31.2 |1100 | |[resnet152.a2_in1k](https://huggingface.co/timm/resnet152.a2_in1k)|288 |82.62|95.75|60.2 |19.1 |37.3 |904 | |[resnetaa50d.sw_in12k_ft_in1k](https://huggingface.co/timm/resnetaa50d.sw_in12k_ft_in1k)|288 |82.61|96.49|25.6 |8.9 |20.6 |1729 | |[resnet61q.ra2_in1k](https://huggingface.co/timm/resnet61q.ra2_in1k)|288 |82.53|96.13|36.8 |9.9 |21.5 |1773 | |[wide_resnet101_2.tv2_in1k](https://huggingface.co/timm/wide_resnet101_2.tv2_in1k)|224 |82.5 |96.02|126.9 |22.8 |21.2 |1078 | |[resnext101_64x4d.c1_in1k](https://huggingface.co/timm/resnext101_64x4d.c1_in1k)|224 |82.46|95.92|83.5 |15.5 |31.2 |987 | |[resnet51q.ra2_in1k](https://huggingface.co/timm/resnet51q.ra2_in1k)|288 |82.36|96.18|35.7 |8.1 |20.9 |1964 | |[ecaresnet50t.ra2_in1k](https://huggingface.co/timm/ecaresnet50t.ra2_in1k)|320 |82.35|96.14|25.6 |8.8 |24.1 |1386 | |[resnet101.a1_in1k](https://huggingface.co/timm/resnet101.a1_in1k)|288 |82.31|95.63|44.6 |13.0 |26.8 |1291 | |[resnetrs101.tf_in1k](https://huggingface.co/timm/resnetrs101.tf_in1k)|288 |82.29|96.01|63.6 |13.6 |28.5 |1078 | |[resnet152.tv2_in1k](https://huggingface.co/timm/resnet152.tv2_in1k)|224 |82.29|96.0 |60.2 |11.6 |22.6 |1484 | |[wide_resnet50_2.racm_in1k](https://huggingface.co/timm/wide_resnet50_2.racm_in1k)|288 |82.27|96.06|68.9 |18.9 |23.8 |1176 | |[resnet101d.ra2_in1k](https://huggingface.co/timm/resnet101d.ra2_in1k)|256 |82.26|96.07|44.6 |10.6 |22.2 |1542 | |[resnet101.a2_in1k](https://huggingface.co/timm/resnet101.a2_in1k)|288 |82.24|95.73|44.6 |13.0 |26.8 |1290 | |[seresnext50_32x4d.racm_in1k](https://huggingface.co/timm/seresnext50_32x4d.racm_in1k)|288 |82.2 |96.14|27.6 |7.0 |23.8 |1547 | |[ecaresnet101d.miil_in1k](https://huggingface.co/timm/ecaresnet101d.miil_in1k)|224 |82.18|96.05|44.6 |8.1 |17.1 |1771 | |[resnext50_32x4d.fb_swsl_ig1b_ft_in1k](https://huggingface.co/timm/resnext50_32x4d.fb_swsl_ig1b_ft_in1k)|224 |82.17|96.22|25.0 |4.3 |14.4 |2943 | |[ecaresnet50t.a1_in1k](https://huggingface.co/timm/ecaresnet50t.a1_in1k)|288 |82.12|95.65|25.6 |7.1 |19.6 |1704 | |[resnext50_32x4d.a1h_in1k](https://huggingface.co/timm/resnext50_32x4d.a1h_in1k)|288 |82.03|95.94|25.0 |7.0 |23.8 |1745 | |[ecaresnet101d_pruned.miil_in1k](https://huggingface.co/timm/ecaresnet101d_pruned.miil_in1k)|288 |82.0 |96.15|24.9 |5.8 |12.7 |1787 | |[resnet61q.ra2_in1k](https://huggingface.co/timm/resnet61q.ra2_in1k)|256 |81.99|95.85|36.8 |7.8 |17.0 |2230 | |[resnext101_32x8d.tv2_in1k](https://huggingface.co/timm/resnext101_32x8d.tv2_in1k)|176 |81.98|95.72|88.8 |10.3 |19.4 |1768 | |[resnet152.a1_in1k](https://huggingface.co/timm/resnet152.a1_in1k)|224 |81.97|95.24|60.2 |11.6 |22.6 |1486 | |[resnet101.a1h_in1k](https://huggingface.co/timm/resnet101.a1h_in1k)|224 |81.93|95.75|44.6 |7.8 |16.2 |2122 | |[resnet101.tv2_in1k](https://huggingface.co/timm/resnet101.tv2_in1k)|224 |81.9 |95.77|44.6 |7.8 |16.2 |2118 | |[resnext101_32x16d.fb_ssl_yfcc100m_ft_in1k](https://huggingface.co/timm/resnext101_32x16d.fb_ssl_yfcc100m_ft_in1k)|224 |81.84|96.1 |194.0 |36.3 |51.2 |583 | |[resnet51q.ra2_in1k](https://huggingface.co/timm/resnet51q.ra2_in1k)|256 |81.78|95.94|35.7 |6.4 |16.6 |2471 | |[resnet152.a2_in1k](https://huggingface.co/timm/resnet152.a2_in1k)|224 |81.77|95.22|60.2 |11.6 |22.6 |1485 | |[resnetaa50d.sw_in12k_ft_in1k](https://huggingface.co/timm/resnetaa50d.sw_in12k_ft_in1k)|224 |81.74|96.06|25.6 |5.4 |12.4 |2813 | |[ecaresnet50t.a2_in1k](https://huggingface.co/timm/ecaresnet50t.a2_in1k)|288 |81.65|95.54|25.6 |7.1 |19.6 |1703 | |[ecaresnet50d.miil_in1k](https://huggingface.co/timm/ecaresnet50d.miil_in1k)|288 |81.64|95.88|25.6 |7.2 |19.7 |1694 | |[resnext101_32x8d.fb_ssl_yfcc100m_ft_in1k](https://huggingface.co/timm/resnext101_32x8d.fb_ssl_yfcc100m_ft_in1k)|224 |81.62|96.04|88.8 |16.5 |31.2 |1101 | |[wide_resnet50_2.tv2_in1k](https://huggingface.co/timm/wide_resnet50_2.tv2_in1k)|224 |81.61|95.76|68.9 |11.4 |14.4 |1930 | |[resnetaa50.a1h_in1k](https://huggingface.co/timm/resnetaa50.a1h_in1k)|288 |81.61|95.83|25.6 |8.5 |19.2 |1868 | |[resnet101.a1_in1k](https://huggingface.co/timm/resnet101.a1_in1k)|224 |81.5 |95.16|44.6 |7.8 |16.2 |2125 | |[resnext50_32x4d.a1_in1k](https://huggingface.co/timm/resnext50_32x4d.a1_in1k)|288 |81.48|95.16|25.0 |7.0 |23.8 |1745 | |[gcresnet50t.ra2_in1k](https://huggingface.co/timm/gcresnet50t.ra2_in1k)|288 |81.47|95.71|25.9 |6.9 |18.6 |2071 | |[wide_resnet50_2.racm_in1k](https://huggingface.co/timm/wide_resnet50_2.racm_in1k)|224 |81.45|95.53|68.9 |11.4 |14.4 |1929 | |[resnet50d.a1_in1k](https://huggingface.co/timm/resnet50d.a1_in1k)|288 |81.44|95.22|25.6 |7.2 |19.7 |1908 | |[ecaresnet50t.ra2_in1k](https://huggingface.co/timm/ecaresnet50t.ra2_in1k)|256 |81.44|95.67|25.6 |5.6 |15.4 |2168 | |[ecaresnetlight.miil_in1k](https://huggingface.co/timm/ecaresnetlight.miil_in1k)|288 |81.4 |95.82|30.2 |6.8 |13.9 |2132 | |[resnet50d.ra2_in1k](https://huggingface.co/timm/resnet50d.ra2_in1k)|288 |81.37|95.74|25.6 |7.2 |19.7 |1910 | |[resnet101.a2_in1k](https://huggingface.co/timm/resnet101.a2_in1k)|224 |81.32|95.19|44.6 |7.8 |16.2 |2125 | |[seresnet50.ra2_in1k](https://huggingface.co/timm/seresnet50.ra2_in1k)|288 |81.3 |95.65|28.1 |6.8 |18.4 |1803 | |[resnext50_32x4d.a2_in1k](https://huggingface.co/timm/resnext50_32x4d.a2_in1k)|288 |81.3 |95.11|25.0 |7.0 |23.8 |1746 | |[seresnext50_32x4d.racm_in1k](https://huggingface.co/timm/seresnext50_32x4d.racm_in1k)|224 |81.27|95.62|27.6 |4.3 |14.4 |2591 | |[ecaresnet50t.a1_in1k](https://huggingface.co/timm/ecaresnet50t.a1_in1k)|224 |81.26|95.16|25.6 |4.3 |11.8 |2823 | |[gcresnext50ts.ch_in1k](https://huggingface.co/timm/gcresnext50ts.ch_in1k)|288 |81.23|95.54|15.7 |4.8 |19.6 |2117 | |[senet154.gluon_in1k](https://huggingface.co/timm/senet154.gluon_in1k)|224 |81.23|95.35|115.1 |20.8 |38.7 |545 | |[resnet50.a1_in1k](https://huggingface.co/timm/resnet50.a1_in1k)|288 |81.22|95.11|25.6 |6.8 |18.4 |2089 | |[resnet50_gn.a1h_in1k](https://huggingface.co/timm/resnet50_gn.a1h_in1k)|288 |81.22|95.63|25.6 |6.8 |18.4 |676 | |[resnet50d.a2_in1k](https://huggingface.co/timm/resnet50d.a2_in1k)|288 |81.18|95.09|25.6 |7.2 |19.7 |1908 | |[resnet50.fb_swsl_ig1b_ft_in1k](https://huggingface.co/timm/resnet50.fb_swsl_ig1b_ft_in1k)|224 |81.18|95.98|25.6 |4.1 |11.1 |3455 | |[resnext50_32x4d.tv2_in1k](https://huggingface.co/timm/resnext50_32x4d.tv2_in1k)|224 |81.17|95.34|25.0 |4.3 |14.4 |2933 | |[resnext50_32x4d.a1h_in1k](https://huggingface.co/timm/resnext50_32x4d.a1h_in1k)|224 |81.1 |95.33|25.0 |4.3 |14.4 |2934 | |[seresnet50.a2_in1k](https://huggingface.co/timm/seresnet50.a2_in1k)|288 |81.1 |95.23|28.1 |6.8 |18.4 |1801 | |[seresnet50.a1_in1k](https://huggingface.co/timm/seresnet50.a1_in1k)|288 |81.1 |95.12|28.1 |6.8 |18.4 |1799 | |[resnet152s.gluon_in1k](https://huggingface.co/timm/resnet152s.gluon_in1k)|224 |81.02|95.41|60.3 |12.9 |25.0 |1347 | |[resnet50.d_in1k](https://huggingface.co/timm/resnet50.d_in1k)|288 |80.97|95.44|25.6 |6.8 |18.4 |2085 | |[gcresnet50t.ra2_in1k](https://huggingface.co/timm/gcresnet50t.ra2_in1k)|256 |80.94|95.45|25.9 |5.4 |14.7 |2571 | |[resnext101_32x4d.fb_ssl_yfcc100m_ft_in1k](https://huggingface.co/timm/resnext101_32x4d.fb_ssl_yfcc100m_ft_in1k)|224 |80.93|95.73|44.2 |8.0 |21.2 |1814 | |[resnet50.c1_in1k](https://huggingface.co/timm/resnet50.c1_in1k)|288 |80.91|95.55|25.6 |6.8 |18.4 |2084 | |[seresnext101_32x4d.gluon_in1k](https://huggingface.co/timm/seresnext101_32x4d.gluon_in1k)|224 |80.9 |95.31|49.0 |8.0 |21.3 |1585 | |[seresnext101_64x4d.gluon_in1k](https://huggingface.co/timm/seresnext101_64x4d.gluon_in1k)|224 |80.9 |95.3 |88.2 |15.5 |31.2 |918 | |[resnet50.c2_in1k](https://huggingface.co/timm/resnet50.c2_in1k)|288 |80.86|95.52|25.6 |6.8 |18.4 |2085 | |[resnet50.tv2_in1k](https://huggingface.co/timm/resnet50.tv2_in1k)|224 |80.85|95.43|25.6 |4.1 |11.1 |3450 | |[ecaresnet50t.a2_in1k](https://huggingface.co/timm/ecaresnet50t.a2_in1k)|224 |80.84|95.02|25.6 |4.3 |11.8 |2821 | |[ecaresnet101d_pruned.miil_in1k](https://huggingface.co/timm/ecaresnet101d_pruned.miil_in1k)|224 |80.79|95.62|24.9 |3.5 |7.7 |2961 | |[seresnet33ts.ra2_in1k](https://huggingface.co/timm/seresnet33ts.ra2_in1k)|288 |80.79|95.36|19.8 |6.0 |14.8 |2506 | |[ecaresnet50d_pruned.miil_in1k](https://huggingface.co/timm/ecaresnet50d_pruned.miil_in1k)|288 |80.79|95.58|19.9 |4.2 |10.6 |2349 | |[resnet50.a2_in1k](https://huggingface.co/timm/resnet50.a2_in1k)|288 |80.78|94.99|25.6 |6.8 |18.4 |2088 | |[resnet50.b1k_in1k](https://huggingface.co/timm/resnet50.b1k_in1k)|288 |80.71|95.43|25.6 |6.8 |18.4 |2087 | |[resnext50_32x4d.ra_in1k](https://huggingface.co/timm/resnext50_32x4d.ra_in1k)|288 |80.7 |95.39|25.0 |7.0 |23.8 |1749 | |[resnetrs101.tf_in1k](https://huggingface.co/timm/resnetrs101.tf_in1k)|192 |80.69|95.24|63.6 |6.0 |12.7 |2270 | |[resnet50d.a1_in1k](https://huggingface.co/timm/resnet50d.a1_in1k)|224 |80.68|94.71|25.6 |4.4 |11.9 |3162 | |[eca_resnet33ts.ra2_in1k](https://huggingface.co/timm/eca_resnet33ts.ra2_in1k)|288 |80.68|95.36|19.7 |6.0 |14.8 |2637 | |[resnet50.a1h_in1k](https://huggingface.co/timm/resnet50.a1h_in1k)|224 |80.67|95.3 |25.6 |4.1 |11.1 |3452 | |[resnext50d_32x4d.bt_in1k](https://huggingface.co/timm/resnext50d_32x4d.bt_in1k)|288 |80.67|95.42|25.0 |7.4 |25.1 |1626 | |[resnetaa50.a1h_in1k](https://huggingface.co/timm/resnetaa50.a1h_in1k)|224 |80.63|95.21|25.6 |5.2 |11.6 |3034 | |[ecaresnet50d.miil_in1k](https://huggingface.co/timm/ecaresnet50d.miil_in1k)|224 |80.61|95.32|25.6 |4.4 |11.9 |2813 | |[resnext101_64x4d.gluon_in1k](https://huggingface.co/timm/resnext101_64x4d.gluon_in1k)|224 |80.61|94.99|83.5 |15.5 |31.2 |989 | |[gcresnet33ts.ra2_in1k](https://huggingface.co/timm/gcresnet33ts.ra2_in1k)|288 |80.6 |95.31|19.9 |6.0 |14.8 |2578 | |[gcresnext50ts.ch_in1k](https://huggingface.co/timm/gcresnext50ts.ch_in1k)|256 |80.57|95.17|15.7 |3.8 |15.5 |2710 | |[resnet152.a3_in1k](https://huggingface.co/timm/resnet152.a3_in1k)|224 |80.56|95.0 |60.2 |11.6 |22.6 |1483 | |[resnet50d.ra2_in1k](https://huggingface.co/timm/resnet50d.ra2_in1k)|224 |80.53|95.16|25.6 |4.4 |11.9 |3164 | |[resnext50_32x4d.a1_in1k](https://huggingface.co/timm/resnext50_32x4d.a1_in1k)|224 |80.53|94.46|25.0 |4.3 |14.4 |2930 | |[wide_resnet101_2.tv2_in1k](https://huggingface.co/timm/wide_resnet101_2.tv2_in1k)|176 |80.48|94.98|126.9 |14.3 |13.2 |1719 | |[resnet152d.gluon_in1k](https://huggingface.co/timm/resnet152d.gluon_in1k)|224 |80.47|95.2 |60.2 |11.8 |23.4 |1428 | |[resnet50.b2k_in1k](https://huggingface.co/timm/resnet50.b2k_in1k)|288 |80.45|95.32|25.6 |6.8 |18.4 |2086 | |[ecaresnetlight.miil_in1k](https://huggingface.co/timm/ecaresnetlight.miil_in1k)|224 |80.45|95.24|30.2 |4.1 |8.4 |3530 | |[resnext50_32x4d.a2_in1k](https://huggingface.co/timm/resnext50_32x4d.a2_in1k)|224 |80.45|94.63|25.0 |4.3 |14.4 |2936 | |[wide_resnet50_2.tv2_in1k](https://huggingface.co/timm/wide_resnet50_2.tv2_in1k)|176 |80.43|95.09|68.9 |7.3 |9.0 |3015 | |[resnet101d.gluon_in1k](https://huggingface.co/timm/resnet101d.gluon_in1k)|224 |80.42|95.01|44.6 |8.1 |17.0 |2007 | |[resnet50.a1_in1k](https://huggingface.co/timm/resnet50.a1_in1k)|224 |80.38|94.6 |25.6 |4.1 |11.1 |3461 | |[seresnet33ts.ra2_in1k](https://huggingface.co/timm/seresnet33ts.ra2_in1k)|256 |80.36|95.1 |19.8 |4.8 |11.7 |3267 | |[resnext101_32x4d.gluon_in1k](https://huggingface.co/timm/resnext101_32x4d.gluon_in1k)|224 |80.34|94.93|44.2 |8.0 |21.2 |1814 | |[resnext50_32x4d.fb_ssl_yfcc100m_ft_in1k](https://huggingface.co/timm/resnext50_32x4d.fb_ssl_yfcc100m_ft_in1k)|224 |80.32|95.4 |25.0 |4.3 |14.4 |2941 | |[resnet101s.gluon_in1k](https://huggingface.co/timm/resnet101s.gluon_in1k)|224 |80.28|95.16|44.7 |9.2 |18.6 |1851 | |[seresnet50.ra2_in1k](https://huggingface.co/timm/seresnet50.ra2_in1k)|224 |80.26|95.08|28.1 |4.1 |11.1 |2972 | |[resnetblur50.bt_in1k](https://huggingface.co/timm/resnetblur50.bt_in1k)|288 |80.24|95.24|25.6 |8.5 |19.9 |1523 | |[resnet50d.a2_in1k](https://huggingface.co/timm/resnet50d.a2_in1k)|224 |80.22|94.63|25.6 |4.4 |11.9 |3162 | |[resnet152.tv2_in1k](https://huggingface.co/timm/resnet152.tv2_in1k)|176 |80.2 |94.64|60.2 |7.2 |14.0 |2346 | |[seresnet50.a2_in1k](https://huggingface.co/timm/seresnet50.a2_in1k)|224 |80.08|94.74|28.1 |4.1 |11.1 |2969 | |[eca_resnet33ts.ra2_in1k](https://huggingface.co/timm/eca_resnet33ts.ra2_in1k)|256 |80.08|94.97|19.7 |4.8 |11.7 |3284 | |[gcresnet33ts.ra2_in1k](https://huggingface.co/timm/gcresnet33ts.ra2_in1k)|256 |80.06|94.99|19.9 |4.8 |11.7 |3216 | |[resnet50_gn.a1h_in1k](https://huggingface.co/timm/resnet50_gn.a1h_in1k)|224 |80.06|94.95|25.6 |4.1 |11.1 |1109 | |[seresnet50.a1_in1k](https://huggingface.co/timm/seresnet50.a1_in1k)|224 |80.02|94.71|28.1 |4.1 |11.1 |2962 | |[resnet50.ram_in1k](https://huggingface.co/timm/resnet50.ram_in1k)|288 |79.97|95.05|25.6 |6.8 |18.4 |2086 | |[resnet152c.gluon_in1k](https://huggingface.co/timm/resnet152c.gluon_in1k)|224 |79.92|94.84|60.2 |11.8 |23.4 |1455 | |[seresnext50_32x4d.gluon_in1k](https://huggingface.co/timm/seresnext50_32x4d.gluon_in1k)|224 |79.91|94.82|27.6 |4.3 |14.4 |2591 | |[resnet50.d_in1k](https://huggingface.co/timm/resnet50.d_in1k)|224 |79.91|94.67|25.6 |4.1 |11.1 |3456 | |[resnet101.tv2_in1k](https://huggingface.co/timm/resnet101.tv2_in1k)|176 |79.9 |94.6 |44.6 |4.9 |10.1 |3341 | |[resnetrs50.tf_in1k](https://huggingface.co/timm/resnetrs50.tf_in1k)|224 |79.89|94.97|35.7 |4.5 |12.1 |2774 | |[resnet50.c2_in1k](https://huggingface.co/timm/resnet50.c2_in1k)|224 |79.88|94.87|25.6 |4.1 |11.1 |3455 | |[ecaresnet26t.ra2_in1k](https://huggingface.co/timm/ecaresnet26t.ra2_in1k)|320 |79.86|95.07|16.0 |5.2 |16.4 |2168 | |[resnet50.a2_in1k](https://huggingface.co/timm/resnet50.a2_in1k)|224 |79.85|94.56|25.6 |4.1 |11.1 |3460 | |[resnet50.ra_in1k](https://huggingface.co/timm/resnet50.ra_in1k)|288 |79.83|94.97|25.6 |6.8 |18.4 |2087 | |[resnet101.a3_in1k](https://huggingface.co/timm/resnet101.a3_in1k)|224 |79.82|94.62|44.6 |7.8 |16.2 |2114 | |[resnext50_32x4d.ra_in1k](https://huggingface.co/timm/resnext50_32x4d.ra_in1k)|224 |79.76|94.6 |25.0 |4.3 |14.4 |2943 | |[resnet50.c1_in1k](https://huggingface.co/timm/resnet50.c1_in1k)|224 |79.74|94.95|25.6 |4.1 |11.1 |3455 | |[ecaresnet50d_pruned.miil_in1k](https://huggingface.co/timm/ecaresnet50d_pruned.miil_in1k)|224 |79.74|94.87|19.9 |2.5 |6.4 |3929 | |[resnet33ts.ra2_in1k](https://huggingface.co/timm/resnet33ts.ra2_in1k)|288 |79.71|94.83|19.7 |6.0 |14.8 |2710 | |[resnet152.gluon_in1k](https://huggingface.co/timm/resnet152.gluon_in1k)|224 |79.68|94.74|60.2 |11.6 |22.6 |1486 | |[resnext50d_32x4d.bt_in1k](https://huggingface.co/timm/resnext50d_32x4d.bt_in1k)|224 |79.67|94.87|25.0 |4.5 |15.2 |2729 | |[resnet50.bt_in1k](https://huggingface.co/timm/resnet50.bt_in1k)|288 |79.63|94.91|25.6 |6.8 |18.4 |2086 | |[ecaresnet50t.a3_in1k](https://huggingface.co/timm/ecaresnet50t.a3_in1k)|224 |79.56|94.72|25.6 |4.3 |11.8 |2805 | |[resnet101c.gluon_in1k](https://huggingface.co/timm/resnet101c.gluon_in1k)|224 |79.53|94.58|44.6 |8.1 |17.0 |2062 | |[resnet50.b1k_in1k](https://huggingface.co/timm/resnet50.b1k_in1k)|224 |79.52|94.61|25.6 |4.1 |11.1 |3459 | |[resnet50.tv2_in1k](https://huggingface.co/timm/resnet50.tv2_in1k)|176 |79.42|94.64|25.6 |2.6 |6.9 |5397 | |[resnet32ts.ra2_in1k](https://huggingface.co/timm/resnet32ts.ra2_in1k)|288 |79.4 |94.66|18.0 |5.9 |14.6 |2752 | |[resnet50.b2k_in1k](https://huggingface.co/timm/resnet50.b2k_in1k)|224 |79.38|94.57|25.6 |4.1 |11.1 |3459 | |[resnext50_32x4d.tv2_in1k](https://huggingface.co/timm/resnext50_32x4d.tv2_in1k)|176 |79.37|94.3 |25.0 |2.7 |9.0 |4577 | |[resnext50_32x4d.gluon_in1k](https://huggingface.co/timm/resnext50_32x4d.gluon_in1k)|224 |79.36|94.43|25.0 |4.3 |14.4 |2942 | |[resnext101_32x8d.tv_in1k](https://huggingface.co/timm/resnext101_32x8d.tv_in1k)|224 |79.31|94.52|88.8 |16.5 |31.2 |1100 | |[resnet101.gluon_in1k](https://huggingface.co/timm/resnet101.gluon_in1k)|224 |79.31|94.53|44.6 |7.8 |16.2 |2125 | |[resnetblur50.bt_in1k](https://huggingface.co/timm/resnetblur50.bt_in1k)|224 |79.31|94.63|25.6 |5.2 |12.0 |2524 | |[resnet50.a1h_in1k](https://huggingface.co/timm/resnet50.a1h_in1k)|176 |79.27|94.49|25.6 |2.6 |6.9 |5404 | |[resnext50_32x4d.a3_in1k](https://huggingface.co/timm/resnext50_32x4d.a3_in1k)|224 |79.25|94.31|25.0 |4.3 |14.4 |2931 | |[resnet50.fb_ssl_yfcc100m_ft_in1k](https://huggingface.co/timm/resnet50.fb_ssl_yfcc100m_ft_in1k)|224 |79.22|94.84|25.6 |4.1 |11.1 |3451 | |[resnet33ts.ra2_in1k](https://huggingface.co/timm/resnet33ts.ra2_in1k)|256 |79.21|94.56|19.7 |4.8 |11.7 |3392 | |[resnet50d.gluon_in1k](https://huggingface.co/timm/resnet50d.gluon_in1k)|224 |79.07|94.48|25.6 |4.4 |11.9 |3162 | |[resnet50.ram_in1k](https://huggingface.co/timm/resnet50.ram_in1k)|224 |79.03|94.38|25.6 |4.1 |11.1 |3453 | |[resnet50.am_in1k](https://huggingface.co/timm/resnet50.am_in1k)|224 |79.01|94.39|25.6 |4.1 |11.1 |3461 | |[resnet32ts.ra2_in1k](https://huggingface.co/timm/resnet32ts.ra2_in1k)|256 |79.01|94.37|18.0 |4.6 |11.6 |3440 | |[ecaresnet26t.ra2_in1k](https://huggingface.co/timm/ecaresnet26t.ra2_in1k)|256 |78.9 |94.54|16.0 |3.4 |10.5 |3421 | |[resnet152.a3_in1k](https://huggingface.co/timm/resnet152.a3_in1k)|160 |78.89|94.11|60.2 |5.9 |11.5 |2745 | |[wide_resnet101_2.tv_in1k](https://huggingface.co/timm/wide_resnet101_2.tv_in1k)|224 |78.84|94.28|126.9 |22.8 |21.2 |1079 | |[seresnext26d_32x4d.bt_in1k](https://huggingface.co/timm/seresnext26d_32x4d.bt_in1k)|288 |78.83|94.24|16.8 |4.5 |16.8 |2251 | |[resnet50.ra_in1k](https://huggingface.co/timm/resnet50.ra_in1k)|224 |78.81|94.32|25.6 |4.1 |11.1 |3454 | |[seresnext26t_32x4d.bt_in1k](https://huggingface.co/timm/seresnext26t_32x4d.bt_in1k)|288 |78.74|94.33|16.8 |4.5 |16.7 |2264 | |[resnet50s.gluon_in1k](https://huggingface.co/timm/resnet50s.gluon_in1k)|224 |78.72|94.23|25.7 |5.5 |13.5 |2796 | |[resnet50d.a3_in1k](https://huggingface.co/timm/resnet50d.a3_in1k)|224 |78.71|94.24|25.6 |4.4 |11.9 |3154 | |[wide_resnet50_2.tv_in1k](https://huggingface.co/timm/wide_resnet50_2.tv_in1k)|224 |78.47|94.09|68.9 |11.4 |14.4 |1934 | |[resnet50.bt_in1k](https://huggingface.co/timm/resnet50.bt_in1k)|224 |78.46|94.27|25.6 |4.1 |11.1 |3454 | |[resnet34d.ra2_in1k](https://huggingface.co/timm/resnet34d.ra2_in1k)|288 |78.43|94.35|21.8 |6.5 |7.5 |3291 | |[gcresnext26ts.ch_in1k](https://huggingface.co/timm/gcresnext26ts.ch_in1k)|288 |78.42|94.04|10.5 |3.1 |13.3 |3226 | |[resnet26t.ra2_in1k](https://huggingface.co/timm/resnet26t.ra2_in1k)|320 |78.33|94.13|16.0 |5.2 |16.4 |2391 | |[resnet152.tv_in1k](https://huggingface.co/timm/resnet152.tv_in1k)|224 |78.32|94.04|60.2 |11.6 |22.6 |1487 | |[seresnext26ts.ch_in1k](https://huggingface.co/timm/seresnext26ts.ch_in1k)|288 |78.28|94.1 |10.4 |3.1 |13.3 |3062 | |[bat_resnext26ts.ch_in1k](https://huggingface.co/timm/bat_resnext26ts.ch_in1k)|256 |78.25|94.1 |10.7 |2.5 |12.5 |3393 | |[resnet50.a3_in1k](https://huggingface.co/timm/resnet50.a3_in1k)|224 |78.06|93.78|25.6 |4.1 |11.1 |3450 | |[resnet50c.gluon_in1k](https://huggingface.co/timm/resnet50c.gluon_in1k)|224 |78.0 |93.99|25.6 |4.4 |11.9 |3286 | |[eca_resnext26ts.ch_in1k](https://huggingface.co/timm/eca_resnext26ts.ch_in1k)|288 |78.0 |93.91|10.3 |3.1 |13.3 |3297 | |[seresnext26t_32x4d.bt_in1k](https://huggingface.co/timm/seresnext26t_32x4d.bt_in1k)|224 |77.98|93.75|16.8 |2.7 |10.1 |3841 | |[resnet34.a1_in1k](https://huggingface.co/timm/resnet34.a1_in1k)|288 |77.92|93.77|21.8 |6.1 |6.2 |3609 | |[resnet101.a3_in1k](https://huggingface.co/timm/resnet101.a3_in1k)|160 |77.88|93.71|44.6 |4.0 |8.3 |3926 | |[resnet26t.ra2_in1k](https://huggingface.co/timm/resnet26t.ra2_in1k)|256 |77.87|93.84|16.0 |3.4 |10.5 |3772 | |[seresnext26ts.ch_in1k](https://huggingface.co/timm/seresnext26ts.ch_in1k)|256 |77.86|93.79|10.4 |2.4 |10.5 |4263 | |[resnetrs50.tf_in1k](https://huggingface.co/timm/resnetrs50.tf_in1k)|160 |77.82|93.81|35.7 |2.3 |6.2 |5238 | |[gcresnext26ts.ch_in1k](https://huggingface.co/timm/gcresnext26ts.ch_in1k)|256 |77.81|93.82|10.5 |2.4 |10.5 |4183 | |[ecaresnet50t.a3_in1k](https://huggingface.co/timm/ecaresnet50t.a3_in1k)|160 |77.79|93.6 |25.6 |2.2 |6.0 |5329 | |[resnext50_32x4d.a3_in1k](https://huggingface.co/timm/resnext50_32x4d.a3_in1k)|160 |77.73|93.32|25.0 |2.2 |7.4 |5576 | |[resnext50_32x4d.tv_in1k](https://huggingface.co/timm/resnext50_32x4d.tv_in1k)|224 |77.61|93.7 |25.0 |4.3 |14.4 |2944 | |[seresnext26d_32x4d.bt_in1k](https://huggingface.co/timm/seresnext26d_32x4d.bt_in1k)|224 |77.59|93.61|16.8 |2.7 |10.2 |3807 | |[resnet50.gluon_in1k](https://huggingface.co/timm/resnet50.gluon_in1k)|224 |77.58|93.72|25.6 |4.1 |11.1 |3455 | |[eca_resnext26ts.ch_in1k](https://huggingface.co/timm/eca_resnext26ts.ch_in1k)|256 |77.44|93.56|10.3 |2.4 |10.5 |4284 | |[resnet26d.bt_in1k](https://huggingface.co/timm/resnet26d.bt_in1k)|288 |77.41|93.63|16.0 |4.3 |13.5 |2907 | |[resnet101.tv_in1k](https://huggingface.co/timm/resnet101.tv_in1k)|224 |77.38|93.54|44.6 |7.8 |16.2 |2125 | |[resnet50d.a3_in1k](https://huggingface.co/timm/resnet50d.a3_in1k)|160 |77.22|93.27|25.6 |2.2 |6.1 |5982 | |[resnext26ts.ra2_in1k](https://huggingface.co/timm/resnext26ts.ra2_in1k)|288 |77.17|93.47|10.3 |3.1 |13.3 |3392 | |[resnet34.a2_in1k](https://huggingface.co/timm/resnet34.a2_in1k)|288 |77.15|93.27|21.8 |6.1 |6.2 |3615 | |[resnet34d.ra2_in1k](https://huggingface.co/timm/resnet34d.ra2_in1k)|224 |77.1 |93.37|21.8 |3.9 |4.5 |5436 | |[seresnet50.a3_in1k](https://huggingface.co/timm/seresnet50.a3_in1k)|224 |77.02|93.07|28.1 |4.1 |11.1 |2952 | |[resnext26ts.ra2_in1k](https://huggingface.co/timm/resnext26ts.ra2_in1k)|256 |76.78|93.13|10.3 |2.4 |10.5 |4410 | |[resnet26d.bt_in1k](https://huggingface.co/timm/resnet26d.bt_in1k)|224 |76.7 |93.17|16.0 |2.6 |8.2 |4859 | |[resnet34.bt_in1k](https://huggingface.co/timm/resnet34.bt_in1k)|288 |76.5 |93.35|21.8 |6.1 |6.2 |3617 | |[resnet34.a1_in1k](https://huggingface.co/timm/resnet34.a1_in1k)|224 |76.42|92.87|21.8 |3.7 |3.7 |5984 | |[resnet26.bt_in1k](https://huggingface.co/timm/resnet26.bt_in1k)|288 |76.35|93.18|16.0 |3.9 |12.2 |3331 | |[resnet50.tv_in1k](https://huggingface.co/timm/resnet50.tv_in1k)|224 |76.13|92.86|25.6 |4.1 |11.1 |3457 | |[resnet50.a3_in1k](https://huggingface.co/timm/resnet50.a3_in1k)|160 |75.96|92.5 |25.6 |2.1 |5.7 |6490 | |[resnet34.a2_in1k](https://huggingface.co/timm/resnet34.a2_in1k)|224 |75.52|92.44|21.8 |3.7 |3.7 |5991 | |[resnet26.bt_in1k](https://huggingface.co/timm/resnet26.bt_in1k)|224 |75.3 |92.58|16.0 |2.4 |7.4 |5583 | |[resnet34.bt_in1k](https://huggingface.co/timm/resnet34.bt_in1k)|224 |75.16|92.18|21.8 |3.7 |3.7 |5994 | |[seresnet50.a3_in1k](https://huggingface.co/timm/seresnet50.a3_in1k)|160 |75.1 |92.08|28.1 |2.1 |5.7 |5513 | |[resnet34.gluon_in1k](https://huggingface.co/timm/resnet34.gluon_in1k)|224 |74.57|91.98|21.8 |3.7 |3.7 |5984 | |[resnet18d.ra2_in1k](https://huggingface.co/timm/resnet18d.ra2_in1k)|288 |73.81|91.83|11.7 |3.4 |5.4 |5196 | |[resnet34.tv_in1k](https://huggingface.co/timm/resnet34.tv_in1k)|224 |73.32|91.42|21.8 |3.7 |3.7 |5979 | |[resnet18.fb_swsl_ig1b_ft_in1k](https://huggingface.co/timm/resnet18.fb_swsl_ig1b_ft_in1k)|224 |73.28|91.73|11.7 |1.8 |2.5 |10213 | |[resnet18.a1_in1k](https://huggingface.co/timm/resnet18.a1_in1k)|288 |73.16|91.03|11.7 |3.0 |4.1 |6050 | |[resnet34.a3_in1k](https://huggingface.co/timm/resnet34.a3_in1k)|224 |72.98|91.11|21.8 |3.7 |3.7 |5967 | |[resnet18.fb_ssl_yfcc100m_ft_in1k](https://huggingface.co/timm/resnet18.fb_ssl_yfcc100m_ft_in1k)|224 |72.6 |91.42|11.7 |1.8 |2.5 |10213 | |[resnet18.a2_in1k](https://huggingface.co/timm/resnet18.a2_in1k)|288 |72.37|90.59|11.7 |3.0 |4.1 |6051 | |[resnet14t.c3_in1k](https://huggingface.co/timm/resnet14t.c3_in1k)|224 |72.26|90.31|10.1 |1.7 |5.8 |7026 | |[resnet18d.ra2_in1k](https://huggingface.co/timm/resnet18d.ra2_in1k)|224 |72.26|90.68|11.7 |2.1 |3.3 |8707 | |[resnet18.a1_in1k](https://huggingface.co/timm/resnet18.a1_in1k)|224 |71.49|90.07|11.7 |1.8 |2.5 |10187 | |[resnet14t.c3_in1k](https://huggingface.co/timm/resnet14t.c3_in1k)|176 |71.31|89.69|10.1 |1.1 |3.6 |10970 | |[resnet18.gluon_in1k](https://huggingface.co/timm/resnet18.gluon_in1k)|224 |70.84|89.76|11.7 |1.8 |2.5 |10210 | |[resnet18.a2_in1k](https://huggingface.co/timm/resnet18.a2_in1k)|224 |70.64|89.47|11.7 |1.8 |2.5 |10194 | |[resnet34.a3_in1k](https://huggingface.co/timm/resnet34.a3_in1k)|160 |70.56|89.52|21.8 |1.9 |1.9 |10737 | |[resnet18.tv_in1k](https://huggingface.co/timm/resnet18.tv_in1k)|224 |69.76|89.07|11.7 |1.8 |2.5 |10205 | |[resnet10t.c3_in1k](https://huggingface.co/timm/resnet10t.c3_in1k)|224 |68.34|88.03|5.4 |1.1 |2.4 |13079 | |[resnet18.a3_in1k](https://huggingface.co/timm/resnet18.a3_in1k)|224 |68.25|88.17|11.7 |1.8 |2.5 |10167 | |[resnet10t.c3_in1k](https://huggingface.co/timm/resnet10t.c3_in1k)|176 |66.71|86.96|5.4 |0.7 |1.5 |20327 | |[resnet18.a3_in1k](https://huggingface.co/timm/resnet18.a3_in1k)|160 |65.66|86.26|11.7 |0.9 |1.3 |18229 | ## Citation ```bibtex @article{He2015, author = {Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun}, title = {Deep Residual Learning for Image Recognition}, journal = {arXiv preprint arXiv:1512.03385}, year = {2015} } ``` ```bibtex @article{He2018BagOT, title={Bag of Tricks for Image Classification with Convolutional Neural Networks}, author={Tong He and Zhi Zhang and Hang Zhang and Zhongyue Zhang and Junyuan Xie and Mu Li}, journal={2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, year={2018}, pages={558-567} } ``` ```bibtex @misc{rw2019timm, author = {Ross Wightman}, title = {PyTorch Image Models}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, doi = {10.5281/zenodo.4414861}, howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} } ```
lorahub/flan_t5_large-race_middle_Is_this_the_right_answer
lorahub
2023-07-24T10:13:53Z
635
0
peft
[ "peft", "region:us" ]
null
2023-07-24T10:13:43Z
--- library_name: peft ---
NousResearch/Yarn-Llama-2-7b-64k
NousResearch
2023-10-07T11:34:26Z
635
23
transformers
[ "transformers", "pytorch", "llama", "text-generation", "custom_code", "dataset:pg19", "arxiv:2309.00071", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2023-08-30T02:45:02Z
--- datasets: - pg19 metrics: - perplexity library_name: transformers --- # Model Card: Nous-Yarn-Llama-2-7b-64k [Preprint (arXiv)](https://arxiv.org/abs/2309.00071) [GitHub](https://github.com/jquesnelle/yarn) ## Model Description Nous-Yarn-Llama-2-7b-64k is a state-of-the-art language model for long context, further pretrained on long context data for 400 steps. This model is the Flash Attention 2 patched version of the original model: https://huggingface.co/conceptofmind/Yarn-Llama-2-7b-64k Note that this model **requires** the [Flash Attention library](https://pypi.org/project/flash-attn/) in order to function correctly, see the Model Usage section for installation instructions. ## Model Training Starting from the base Llama 2 models, this model was further pretrained on a subset of the PG19 dataset, allowing it to effectively utilize up to 64k tokens of context. ## Collaborators - [bloc97](https://github.com/bloc97): Methods, Paper and evals - [@theemozilla](https://twitter.com/theemozilla): Methods, Paper and evals - [@EnricoShippole](https://twitter.com/EnricoShippole): Model Training - [honglu2875](https://github.com/honglu2875): Paper and evals The authors would like to thank Stability AI, Carper AI, and Eleuther AI for their generous support of significant computing resources that enabled the training of these models and the completion of this research. We would also like to thank Jonathan Tow and Dakota Mahan directly for their help in advising on the use of the Stability AI compute cluster. Additionally, we would like to thank a16z, and PygmalionAI, for providing resources to run evaluations and experiments on the models. ## Usage and Prompt Format Install FA2 and Rotary Extensions: ``` pip install flash-attn --no-build-isolation pip install git+https://github.com/HazyResearch/flash-attention.git#subdirectory=csrc/rotary ``` There are no specific prompt formats as this is a pretrained base model. ## Benchmark Results TODO ## Future Plans We plan to continue training when we have more compute and to improve the dataset and/or instruct tune the models in order to improve the long context performance even further. ## Model Usage The model is available for download on HuggingFace.
Legalaz/5HTTBEuyP6RvtvCut7vhKJJVEu3HgrVfBvFRJzdzpAMBu8BL_vgg
Legalaz
2024-02-16T00:05:45Z
635
0
keras
[ "keras", "region:us" ]
null
2024-02-07T00:58:48Z
Entry not found
nijil-k/Bitnet-1.58b-Nous-Llama2-70M
nijil-k
2024-05-08T18:43:55Z
635
0
transformers
[ "transformers", "safetensors", "llama", "text-generation", "arxiv:2402.17764", "license:llama2", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-05-08T18:10:17Z
--- license: llama2 library_name: transformers --- # Bitnet-LLama-70M Inspired from Bitnet-LLama-70M is a 70M parameter model trained using the method described in [The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits](https://arxiv.org/abs/2402.17764). It was trained on the subset of the [HuggingFaceTB/cosmopedia](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia) dataset. This is just a small experiment to try out BitNet. Bitnet-LLama-70M was trained for 2 epochs on Colab T4. This model is just an experiment and you might not get good results while chatting with it due to smaller model size and less training. Wandb training report is as follows: ![image/png](https://huggingface.co/nijil-k/Bitnet-1.58b-Nous-Llama2-70M/resolve/main/Training%20Graphs.png) # Load a pretrained BitNet model ```python from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.models.llama.modeling_llama import * model = "nijil-k/Bitnet-1.58b-Nous-Llama2-70M" tokenizer = AutoTokenizer.from_pretrained(model) model = AutoModelForCausalLM.from_pretrained(model) def convert_to_bitnet(model, copy_weights): for name, module in model.named_modules(): # Replace linear layers with BitNet if isinstance(module, LlamaSdpaAttention) or isinstance(module, LlamaMLP): for child_name, child_module in module.named_children(): if isinstance(child_module, nn.Linear): bitlinear = BitLinear(child_module.in_features, child_module.out_features, child_module.bias is not None).to(device="cuda:0") if copy_weights: bitlinear.weight = child_module.weight if child_module.bias is not None: bitlinear.bias = child_module.bias setattr(module, child_name, bitlinear) # Remove redundant input_layernorms elif isinstance(module, LlamaDecoderLayer): for child_name, child_module in module.named_children(): if isinstance(child_module, LlamaRMSNorm) and child_name == "input_layernorm": setattr(module, child_name, nn.Identity().to(device="cuda:0")) convert_to_bitnet(model, copy_weights=True) model.to(device="cuda:0") prompt = "What is Machine Learning?" inputs = tokenizer(prompt, return_tensors="pt").to(model.device) generate_ids = model.generate(inputs.input_ids, max_length=100) tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0] ```
mmnga/DataPilot-ArrowPro-7B-KUJIRA-gguf
mmnga
2024-05-11T07:24:16Z
635
9
null
[ "gguf", "mistral", "en", "ja", "dataset:TFMC/imatrix-dataset-for-japanese-llm", "license:apache-2.0", "region:us" ]
null
2024-05-09T13:21:27Z
--- license: apache-2.0 language: - en - ja datasets: - TFMC/imatrix-dataset-for-japanese-llm tags: - mistral --- # DataPilot-ArrowPro-7B-KUJIRA-gguf [DataPilotさんが公開しているArrowPro-7B-KUJIRA](https://huggingface.co/DataPilot/ArrowPro-7B-KUJIRA)のggufフォーマット変換版です。 imatrixのデータは[TFMC/imatrix-dataset-for-japanese-llm](https://huggingface.co/datasets/TFMC/imatrix-dataset-for-japanese-llm)を使用して作成しました。 ## 他のモデル [mmnga/DataPilot-ArrowPro-7B-RobinHood-gguf](https://huggingface.co/mmnga/DataPilot-ArrowPro-7B-RobinHood-gguf) [mmnga/DataPilot-ArrowPro-7B-KUJIRA-gguf](https://huggingface.co/mmnga/DataPilot-ArrowPro-7B-KUJIRA-gguf) ## Usage ``` git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp make -j ./main -m 'DataPilot-ArrowPro-7B-KUJIRA-Q4_0.gguf' -n 128 -p 'こんにちわ' ```
SchizoDev/Llama3-8b-CunnyGPT-16bit
SchizoDev
2024-06-19T19:02:50Z
635
8
transformers
[ "transformers", "pytorch", "llama", "text-generation", "unsloth", "trl", "sft", "dataset:SchizoDev/CunnyGPT", "license:llama3", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-05-11T21:14:10Z
Invalid username or password.
VeriUs/VeriUS-LLM-8b-v0.2
VeriUs
2024-05-30T18:47:52Z
635
3
transformers
[ "transformers", "safetensors", "llama", "text-generation", "conversational", "base_model:unsloth/llama-3-8b-bnb-4bit", "license:llama3", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
2024-05-19T20:43:56Z
--- license: llama3 base_model: unsloth/llama-3-8b-bnb-4bit --- # VeriUS LLM 8b v0.2 VeriUS LLM is a instruct following large language model supporting Turkish language based on llama3-8B. ## Model Details Base Model: unsloth/llama-3-8b-bnb-4bit Training Dataset: A carefully curated general domain Turkish instruction dataset. Training Method: Fine-tuned using QLoRA and ORPO #TrainingArguments\ PER_DEVICE_BATCH_SIZE: 2\ GRADIENT_ACCUMULATION_STEPS: 4\ WARMUP_RATIO: 0.03\ NUM_EPOCHS: 2\ LR: 0.000008\ OPTIM: "adamw_8bit"\ WEIGHT_DECAY: 0.01\ LR_SCHEDULER_TYPE: "linear"\ BETA: 0.1 #PEFT Arguments\ RANK: 128\ TARGET_MODULES: - "q_proj" - "k_proj" - "v_proj" - "o_proj" - "gate_proj" - "up_proj" - "down_proj" LORA_ALPHA: 256\ LORA_DROPOUT: 0\ BIAS: "none"\ GRADIENT_CHECKPOINT: 'unsloth'\ USE_RSLORA: false\ ## Usage This model is trained used Unsloth and uses it for fast inference. For Unsloth installation please refer to: https://github.com/unslothai/unsloth This model can also be loaded with AutoModelForCausalLM How to load with unsloth: ```commandline from unsloth import FastLanguageModel max_seq_len = 1024 model, tokenizer = FastLanguageModel.from_pretrained( model_name="VeriUs/VeriUS-LLM-8b-v0.2", max_seq_length=max_seq_len, dtype=None ) FastLanguageModel.for_inference(model) # Enable native 2x faster inference prompt_tempate = """Aşağıda, görevini açıklayan bir talimat ve daha fazla bağlam sağlayan bir girdi verilmiştir. İsteği uygun bir şekilde tamamlayan bir yanıt yaz. ### Talimat: {} ### Girdi: {} ### Yanıt: """ def generate_output(instruction, user_input): input_ids = tokenizer( [ prompt_tempate.format(instruction, user_input) ], return_tensors="pt").to("cuda") outputs = model.generate(**input_ids, max_length=max_seq_len, do_sample=True) # removes prompt, comment this out if you want to see it. outputs = [output[len(input_ids[i].ids):] for i, output in enumerate(outputs)] return tokenizer.decode(outputs[0], skip_special_tokens=True) response = generate_output("Türkiye'nin en kalabalık şehri hangisidir?", "") print(response) ``` ## Bias, Risks, and Limitations Limitations and Known Biases Primary Function and Application: VeriUS LLM, an autoregressive language model, is primarily designed to predict the next token in a text string. While often used for various applications, it is important to note that it has not undergone extensive real-world application testing. Its effectiveness and reliability across diverse scenarios remain largely unverified. Language Comprehension and Generation: The base model is primarily trained in standard English. Even though it fine-tuned with and Turkish dataset, its performance in understanding and generating slang, informal language, or other languages may be limited, leading to potential errors or misinterpretations. Generation of False Information: Users should be aware that VeriUS LLM may produce inaccurate or misleading information. Outputs should be considered as starting points or suggestions rather than definitive answers.
just1nseo/1e-6_2
just1nseo
2024-06-27T18:38:31Z
635
0
diffusers
[ "diffusers", "safetensors", "region:us" ]
null
2024-06-27T18:36:38Z
Entry not found
algoprog/mimics-tagging-roberta-base
algoprog
2022-02-24T01:14:23Z
634
0
transformers
[ "transformers", "pytorch", "roberta", "token-classification", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
2022-03-02T23:29:05Z
Entry not found
numind/NuSentiment-multilingual
numind
2024-01-26T10:52:59Z
634
8
transformers
[ "transformers", "pytorch", "safetensors", "xlm-roberta", "feature-extraction", "sentiment-analysis", "text-classification", "generic", "sentiment-classification", "multilingual", "en", "ar", "fr", "de", "pt", "it", "es", "zh", "ja", "ko", "license:mit", "endpoints_compatible", "region:us" ]
feature-extraction
2023-08-11T12:05:16Z
--- license: mit language: - en - ar - fr - de - pt - it - es - zh - ja - ko pipeline_tag: feature-extraction tags: - sentiment-analysis - text-classification - generic - sentiment-classification - multilingual --- ## Model Base version of e5-multilingual finetunned on an annotated subset of mC4 (multilingual C4). This model provide generic embedding for sentiment analysis. Embeddings can be used out of the box or fine tune on specific datasets. Blog post: https://www.numind.ai/blog/creating-task-specific-foundation-models-with-gpt-4 ## Usage Below is an example to encode text and get embedding. ```python import torch from transformers import AutoTokenizer, AutoModel model = AutoModel.from_pretrained("Numind/e5-multilingual-sentiment_analysis") tokenizer = AutoTokenizer.from_pretrained("Numind/e5-multilingual-sentiment_analysis") device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') model.to(device) size = 256 text = "This movie is amazing" encoding = tokenizer( text, truncation=True, padding='max_length', max_length= size, ) emb = model( torch.reshape(torch.tensor(encoding.input_ids),(1,len(encoding.input_ids))).to(device),output_hidden_states=True ).hidden_states[-1].cpu().detach() embText = torch.mean(emb,axis = 1) ```
microsoft/table-transformer-structure-recognition-v1.1-fin
microsoft
2023-11-27T10:40:21Z
634
1
transformers
[ "transformers", "safetensors", "table-transformer", "object-detection", "arxiv:2303.00716", "license:mit", "endpoints_compatible", "region:us" ]
object-detection
2023-11-18T21:30:35Z
--- license: mit --- # Table Transformer (pre-trained for Table Structure Recognition) Table Transformer (TATR) model trained on FinTabNet.c. It was introduced in the paper [Aligning benchmark datasets for table structure recognition](https://arxiv.org/abs/2303.00716) by Smock et al. and first released in [this repository](https://github.com/microsoft/table-transformer). Disclaimer: The team releasing Table Transformer did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The Table Transformer is equivalent to [DETR](https://huggingface.co/docs/transformers/model_doc/detr), a Transformer-based object detection model. Note that the authors decided to use the "normalize before" setting of DETR, which means that layernorm is applied before self- and cross-attention. ## Usage You can use the raw model for detecting tables in documents. See the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/table-transformer) for more info.
TheBloke/Noromaid-13B-v0.2-GGUF
TheBloke
2023-12-20T08:13:54Z
634
2
transformers
[ "transformers", "gguf", "llama", "base_model:NeverSleep/Noromaid-13b-v0.2", "license:cc-by-nc-4.0", "text-generation-inference", "region:us" ]
null
2023-12-20T08:06:46Z
--- base_model: NeverSleep/Noromaid-13b-v0.2 inference: false license: cc-by-nc-4.0 model_creator: IkariDev and Undi model_name: Noromaid 13B V0.2 model_type: llama prompt_template: 'Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ' quantized_by: TheBloke --- <!-- markdownlint-disable MD041 --> <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Noromaid 13B V0.2 - GGUF - Model creator: [IkariDev and Undi](https://huggingface.co/NeverSleep) - Original model: [Noromaid 13B V0.2](https://huggingface.co/NeverSleep/Noromaid-13b-v0.2) <!-- description start --> ## Description This repo contains GGUF format model files for [IkariDev and Undi's Noromaid 13B V0.2](https://huggingface.co/NeverSleep/Noromaid-13b-v0.2). These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/). <!-- description end --> <!-- README_GGUF.md-about-gguf start --> ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models. <!-- README_GGUF.md-about-gguf end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF) * [IkariDev and Undi's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/NeverSleep/Noromaid-13b-v0.2) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Alpaca ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` <!-- prompt-template end --> <!-- licensing start --> ## Licensing The creator of the source model has listed its license as `cc-by-nc-4.0`, and this quantization has therefore used that same license. As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly. In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [IkariDev and Undi's Noromaid 13B V0.2](https://huggingface.co/NeverSleep/Noromaid-13b-v0.2). <!-- licensing end --> <!-- compatibility_gguf start --> ## Compatibility These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) They are also compatible with many third party UIs and libraries - please see the list at the top of this README. ## Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_gguf end --> <!-- README_GGUF.md-provided-files start --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [noromaid-13b-v0.2.Q2_K.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes | | [noromaid-13b-v0.2.Q3_K_S.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss | | [noromaid-13b-v0.2.Q3_K_M.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss | | [noromaid-13b-v0.2.Q3_K_L.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss | | [noromaid-13b-v0.2.Q4_0.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M | | [noromaid-13b-v0.2.Q4_K_S.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q4_K_S.gguf) | Q4_K_S | 4 | 7.42 GB| 9.92 GB | small, greater quality loss | | [noromaid-13b-v0.2.Q4_K_M.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended | | [noromaid-13b-v0.2.Q5_0.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M | | [noromaid-13b-v0.2.Q5_K_S.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended | | [noromaid-13b-v0.2.Q5_K_M.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended | | [noromaid-13b-v0.2.Q6_K.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss | | [noromaid-13b-v0.2.Q8_0.gguf](https://huggingface.co/TheBloke/Noromaid-13B-v0.2-GGUF/blob/main/noromaid-13b-v0.2.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. <!-- README_GGUF.md-provided-files end --> <!-- README_GGUF.md-how-to-download start --> ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: TheBloke/Noromaid-13B-v0.2-GGUF and below it, a specific filename to download, such as: noromaid-13b-v0.2.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download TheBloke/Noromaid-13B-v0.2-GGUF noromaid-13b-v0.2.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download TheBloke/Noromaid-13B-v0.2-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Noromaid-13B-v0.2-GGUF noromaid-13b-v0.2.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> <!-- README_GGUF.md-how-to-download end --> <!-- README_GGUF.md-how-to-run start --> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m noromaid-13b-v0.2.Q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 4096` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./noromaid-13b-v0.2.Q4_K_M.gguf", # Download the model file first n_ctx=4096, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./noromaid-13b-v0.2.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers) <!-- README_GGUF.md-how-to-run end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> <!-- original-model-card start --> # Original model card: IkariDev and Undi's Noromaid 13B V0.2 ![image/png](https://cdn-uploads.huggingface.co/production/uploads/630dfb008df86f1e5becadc3/VKX2Z2yjZX5J8kXzgeCYO.png) --- # Disclaimer: ## This is a ***VERY EXPERIMENTAL*** version, don't expect everything to work!!! ## If you don't like this model, use [Noromaid 0.1.1](https://huggingface.co/NeverSleep/Noromaid-13b-v0.1.1) You may use our custom **prompting format**(scroll down to download them!), or simple alpaca. **(Choose which fits best for you!)** Expect that many things will change in the next version!! --- Mergemonster and a new dataset were used. If you want a 7b, or 20b hit us up in the Community tab! # This model is a collab between [IkariDev](https://huggingface.co/IkariDev) and [Undi](https://huggingface.co/Undi95)! Test model. Suitable for RP, ERP and general stuff. [Recommended settings - No settings yet(Please suggest some over in the Community tab!)] <!-- description start --> ## Description <!-- [Recommended settings - contributed by localfultonextractor](https://files.catbox.moe/ue0tja.json) --> This repo contains FP16 files of Noromaid-13b-v0.2. [FP16 - by IkariDev and Undi](https://huggingface.co/NeverSleep/Noromaid-13b-v0.2) <!-- [GGUF - By TheBloke](https://huggingface.co/TheBloke/Athena-v4-GGUF)--> <!-- [GPTQ - By TheBloke](https://huggingface.co/TheBloke/Athena-v4-GPTQ)--> <!-- [exl2[8bpw-8h] - by AzureBlack](https://huggingface.co/AzureBlack/Echidna-13b-v0.3-8bpw-8h-exl2)--> <!-- [AWQ - By TheBloke](https://huggingface.co/TheBloke/Athena-v4-AWQ)--> <!-- [fp16 - by IkariDev+Undi95](https://huggingface.co/IkariDev/Athena-v4)--> [GGUF - by IkariDev and Undi](https://huggingface.co/NeverSleep/Noromaid-13b-v0.2-GGUF) <!-- [OLD(GGUF - by IkariDev+Undi95)](https://huggingface.co/IkariDev/Athena-v4-GGUF)--> ## Ratings: Note: We have permission of all users to upload their ratings, we DONT screenshot random reviews without asking if we can put them here! No ratings yet! If you want your rating to be here, send us a message over on DC and we'll put up a screenshot of it here. DC name is "ikaridev" and "undi". <!-- description end --> <!-- prompt-template start --> ## Prompt template: Custom format, or Alpaca ### Custom format: UPDATED!! SillyTavern config files: [Context](https://files.catbox.moe/ifmhai.json), [Instruct](https://files.catbox.moe/ttw1l9.json). ### Alpaca: ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` ## Training data used: - [no_robots dataset](https://huggingface.co/Undi95/Llama2-13B-no_robots-alpaca-lora) let the model have more human behavior, enhances the output. - [Aesir Private RP dataset] New data from a new and never used before dataset, add fresh data, no LimaRP spam, this is 100% new. Thanks to the [MinvervaAI Team](https://huggingface.co/MinervaAI) and, in particular, [Gryphe](https://huggingface.co/Gryphe) for letting us use it! - [Another private Aesir dataset] ## Others Undi: If you want to support me, you can [here](https://ko-fi.com/undiai). IkariDev: Visit my [retro/neocities style website](https://ikaridevgit.github.io/) please kek <!-- original-model-card end -->
indischepartij/OpenMia-Indo-Mistral-7b-GGUF
indischepartij
2024-02-02T12:27:31Z
634
0
null
[ "gguf", "en", "id", "license:cc-by-nc-4.0", "region:us" ]
null
2024-01-31T15:42:32Z
--- license: cc-by-nc-4.0 language: - en - id --- Updated to: https://huggingface.co/indischepartij/OpenMia-Indo-Mistral-7b-v2-GGUF
Sanster/brushnet_segmentation_mask
Sanster
2024-04-10T07:40:34Z
634
0
diffusers
[ "diffusers", "safetensors", "region:us" ]
null
2024-04-10T07:39:36Z
Entry not found
RichardErkhov/distilbert_-_distilgpt2-gguf
RichardErkhov
2024-05-01T22:05:48Z
634
0
null
[ "gguf", "arxiv:1910.01108", "arxiv:2201.08542", "arxiv:2203.12574", "arxiv:1910.09700", "arxiv:1503.02531", "region:us" ]
null
2024-04-17T08:56:13Z
Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) distilgpt2 - GGUF - Model creator: https://huggingface.co/distilbert/ - Original model: https://huggingface.co/distilbert/distilgpt2/ | Name | Quant method | Size | | ---- | ---- | ---- | | [distilgpt2.Q2_K.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q2_K.gguf) | Q2_K | 0.06GB | | [distilgpt2.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.IQ3_XS.gguf) | IQ3_XS | 0.06GB | | [distilgpt2.IQ3_S.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.IQ3_S.gguf) | IQ3_S | 0.07GB | | [distilgpt2.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q3_K_S.gguf) | Q3_K_S | 0.07GB | | [distilgpt2.IQ3_M.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.IQ3_M.gguf) | IQ3_M | 0.07GB | | [distilgpt2.Q3_K.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q3_K.gguf) | Q3_K | 0.07GB | | [distilgpt2.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q3_K_M.gguf) | Q3_K_M | 0.07GB | | [distilgpt2.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q3_K_L.gguf) | Q3_K_L | 0.07GB | | [distilgpt2.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.IQ4_XS.gguf) | IQ4_XS | 0.07GB | | [distilgpt2.Q4_0.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q4_0.gguf) | Q4_0 | 0.08GB | | [distilgpt2.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.IQ4_NL.gguf) | IQ4_NL | 0.08GB | | [distilgpt2.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q4_K_S.gguf) | Q4_K_S | 0.08GB | | [distilgpt2.Q4_K.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q4_K.gguf) | Q4_K | 0.08GB | | [distilgpt2.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q4_K_M.gguf) | Q4_K_M | 0.08GB | | [distilgpt2.Q4_1.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q4_1.gguf) | Q4_1 | 0.08GB | | [distilgpt2.Q5_0.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q5_0.gguf) | Q5_0 | 0.08GB | | [distilgpt2.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q5_K_S.gguf) | Q5_K_S | 0.08GB | | [distilgpt2.Q5_K.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q5_K.gguf) | Q5_K | 0.09GB | | [distilgpt2.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q5_K_M.gguf) | Q5_K_M | 0.09GB | | [distilgpt2.Q5_1.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q5_1.gguf) | Q5_1 | 0.09GB | | [distilgpt2.Q6_K.gguf](https://huggingface.co/RichardErkhov/distilbert_-_distilgpt2-gguf/blob/main/distilgpt2.Q6_K.gguf) | Q6_K | 0.09GB | Original model description: --- language: en tags: - exbert license: apache-2.0 datasets: - openwebtext model-index: - name: distilgpt2 results: - task: type: text-generation name: Text Generation dataset: type: wikitext name: WikiText-103 metrics: - type: perplexity name: Perplexity value: 21.1 co2_eq_emissions: 149200 --- # DistilGPT2 DistilGPT2 (short for Distilled-GPT2) is an English-language model pre-trained with the supervision of the smallest version of Generative Pre-trained Transformer 2 (GPT-2). Like GPT-2, DistilGPT2 can be used to generate text. Users of this model card should also consider information about the design, training, and limitations of [GPT-2](https://huggingface.co/gpt2). ## Model Details - **Developed by:** Hugging Face - **Model type:** Transformer-based Language Model - **Language:** English - **License:** Apache 2.0 - **Model Description:** DistilGPT2 is an English-language model pre-trained with the supervision of the 124 million parameter version of GPT-2. DistilGPT2, which has 82 million parameters, was developed using [knowledge distillation](#knowledge-distillation) and was designed to be a faster, lighter version of GPT-2. - **Resources for more information:** See [this repository](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation) for more about Distil\* (a class of compressed models including Distilled-GPT2), [Sanh et al. (2019)](https://arxiv.org/abs/1910.01108) for more information about knowledge distillation and the training procedure, and this page for more about [GPT-2](https://openai.com/blog/better-language-models/). ## Uses, Limitations and Risks #### Limitations and Risks <details> <summary>Click to expand</summary> **CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes.** As the developers of GPT-2 (OpenAI) note in their [model card](https://github.com/openai/gpt-2/blob/master/model_card.md), “language models like GPT-2 reflect the biases inherent to the systems they were trained on.” Significant research has explored bias and fairness issues with models for language generation including GPT-2 (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). DistilGPT2 also suffers from persistent bias issues, as highlighted in the demonstrative examples below. Note that these examples are not a comprehensive stress-testing of the model. Readers considering using the model should consider more rigorous evaluations of the model depending on their use case and context. The impact of model compression techniques – such as knowledge distillation – on bias and fairness issues associated with language models is an active area of research. For example: - [Silva, Tambwekar and Gombolay (2021)](https://aclanthology.org/2021.naacl-main.189.pdf) find that distilled versions of BERT and RoBERTa consistently exhibit statistically significant bias (with regard to gender and race) with effect sizes larger than the teacher models. - [Xu and Hu (2022)](https://arxiv.org/pdf/2201.08542.pdf) find that distilled versions of GPT-2 showed consistent reductions in toxicity and bias compared to the teacher model (see the paper for more detail on metrics used to define/measure toxicity and bias). - [Gupta et al. (2022)](https://arxiv.org/pdf/2203.12574.pdf) find that DistilGPT2 exhibits greater gender disparities than GPT-2 and propose a technique for mitigating gender bias in distilled language models like DistilGPT2. ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='distilgpt2') >>> set_seed(48) >>> generator("The White man worked as a", max_length=20, num_return_sequences=3) [{'generated_text': "The White man worked as a salesman at a McDonald's restaurant called Kia at the time of the"}, {'generated_text': 'The White man worked as a contractor in the Army in the late 1990s. He became a "'}, {'generated_text': 'The White man worked as a police spokesman to the US Navy in the 1930s.'}] >>> set_seed(48) >>> generator("The Black man worked as a", max_length=20, num_return_sequences=3) [{'generated_text': 'The Black man worked as a shop assistant for an hour at Wal-Mart at Wal-Mart in'}, {'generated_text': 'The Black man worked as a waiter in the hotel when he was assaulted when he got out of a'}, {'generated_text': 'The Black man worked as a police spokesman four months ago...'}] ``` </details> #### Potential Uses Since DistilGPT2 is a distilled version of GPT-2, it is intended to be used for similar use cases with the increased functionality of being smaller and easier to run than the base model. The developers of GPT-2 state in their [model card](https://github.com/openai/gpt-2/blob/master/model_card.md) that they envisioned GPT-2 would be used by researchers to better understand large-scale generative language models, with possible secondary use cases including: > - *Writing assistance: Grammar assistance, autocompletion (for normal prose or code)* > - *Creative writing and art: exploring the generation of creative, fictional texts; aiding creation of poetry and other literary art.* > - *Entertainment: Creation of games, chat bots, and amusing generations.* Using DistilGPT2, the Hugging Face team built the [Write With Transformers](https://transformer.huggingface.co/doc/distil-gpt2) web app, which allows users to play with the model to generate text directly from their browser. #### Out-of-scope Uses OpenAI states in the GPT-2 [model card](https://github.com/openai/gpt-2/blob/master/model_card.md): > Because large-scale language models like GPT-2 do not distinguish fact from fiction, we don’t support use-cases that require the generated text to be true. > > Additionally, language models like GPT-2 reflect the biases inherent to the systems they were trained on, so we do not recommend that they be deployed into systems that interact with humans unless the deployers first carry out a study of biases relevant to the intended use-case. ### How to Get Started with the Model <details> <summary>Click to expand</summary> *Be sure to read the sections on in-scope and out-of-scope uses and limitations of the model for further information on how to use the model.* Using DistilGPT2 is similar to using GPT-2. DistilGPT2 can be used directly with a pipeline for text generation. Since the generation relies on some randomness, we set a seed for reproducibility: ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='distilgpt2') >>> set_seed(42) >>> generator("Hello, I’m a language model", max_length=20, num_return_sequences=5) Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation. [{'generated_text': "Hello, I'm a language model, I'm a language model. In my previous post I've"}, {'generated_text': "Hello, I'm a language model, and I'd love to hear what you think about it."}, {'generated_text': "Hello, I'm a language model, but I don't get much of a connection anymore, so"}, {'generated_text': "Hello, I'm a language model, a functional language... It's not an example, and that"}, {'generated_text': "Hello, I'm a language model, not an object model.\n\nIn a nutshell, I"}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import GPT2Tokenizer, GPT2Model tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2') model = GPT2Model.from_pretrained('distilgpt2') text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` And in TensorFlow: ```python from transformers import GPT2Tokenizer, TFGPT2Model tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2') model = TFGPT2Model.from_pretrained('distilgpt2') text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` </details> ## Training Data DistilGPT2 was trained using [OpenWebTextCorpus](https://skylion007.github.io/OpenWebTextCorpus/), an open-source reproduction of OpenAI’s WebText dataset, which was used to train GPT-2. See the [OpenWebTextCorpus Dataset Card](https://huggingface.co/datasets/openwebtext) for additional information about OpenWebTextCorpus and [Radford et al. (2019)](https://d4mucfpksywv.cloudfront.net/better-language-models/language-models.pdf) for additional information about WebText. ## Training Procedure The texts were tokenized using the same tokenizer as GPT-2, a byte-level version of Byte Pair Encoding (BPE). DistilGPT2 was trained using knowledge distillation, following a procedure similar to the training procedure for DistilBERT, described in more detail in [Sanh et al. (2019)](https://arxiv.org/abs/1910.01108). ## Evaluation Results The creators of DistilGPT2 [report](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation) that, on the [WikiText-103](https://blog.einstein.ai/the-wikitext-long-term-dependency-language-modeling-dataset/) benchmark, GPT-2 reaches a perplexity on the test set of 16.3 compared to 21.1 for DistilGPT2 (after fine-tuning on the train set). ## Environmental Impact *Carbon emissions were estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact.* - **Hardware Type:** 8 16GB V100 - **Hours used:** 168 (1 week) - **Cloud Provider:** Azure - **Compute Region:** unavailable, assumed East US for calculations - **Carbon Emitted** *(Power consumption x Time x Carbon produced based on location of power grid)*: 149.2 kg eq. CO2 ## Citation ```bibtex @inproceedings{sanh2019distilbert, title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter}, author={Sanh, Victor and Debut, Lysandre and Chaumond, Julien and Wolf, Thomas}, booktitle={NeurIPS EMC^2 Workshop}, year={2019} } ``` ## Glossary - <a name="knowledge-distillation">**Knowledge Distillation**</a>: As described in [Sanh et al. (2019)](https://arxiv.org/pdf/1910.01108.pdf), “knowledge distillation is a compression technique in which a compact model – the student – is trained to reproduce the behavior of a larger model – the teacher – or an ensemble of models.” Also see [Bucila et al. (2006)](https://www.cs.cornell.edu/~caruana/compression.kdd06.pdf) and [Hinton et al. (2015)](https://arxiv.org/abs/1503.02531). <a href="https://huggingface.co/exbert/?model=distilgpt2"> <img width="300px" src="https://cdn-media.huggingface.co/exbert/button.png"> </a>
mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF
mradermacher
2024-05-29T00:59:24Z
634
0
transformers
[ "transformers", "gguf", "llama-factory", "en", "base_model:mudler/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2", "endpoints_compatible", "region:us" ]
null
2024-05-28T02:18:54Z
--- base_model: mudler/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2 language: - en library_name: transformers quantized_by: mradermacher tags: - llama-factory --- ## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: nicoboss --> weighted/imatrix quants of https://huggingface.co/mudler/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2 <!-- provided-files --> static quants are available at https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-GGUF ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ1_S.gguf) | i1-IQ1_S | 2.1 | for the desperate | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ1_M.gguf) | i1-IQ1_M | 2.3 | mostly desperate | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ2_XXS.gguf) | i1-IQ2_XXS | 2.5 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ2_XS.gguf) | i1-IQ2_XS | 2.7 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ2_S.gguf) | i1-IQ2_S | 2.9 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ2_M.gguf) | i1-IQ2_M | 3.0 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q2_K.gguf) | i1-Q2_K | 3.3 | IQ3_XXS probably better | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ3_XXS.gguf) | i1-IQ3_XXS | 3.4 | lower quality | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ3_XS.gguf) | i1-IQ3_XS | 3.6 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q3_K_S.gguf) | i1-Q3_K_S | 3.8 | IQ3_XS probably better | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ3_S.gguf) | i1-IQ3_S | 3.8 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ3_M.gguf) | i1-IQ3_M | 3.9 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q3_K_M.gguf) | i1-Q3_K_M | 4.1 | IQ3_S probably better | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q3_K_L.gguf) | i1-Q3_K_L | 4.4 | IQ3_M probably better | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-IQ4_XS.gguf) | i1-IQ4_XS | 4.5 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q4_0.gguf) | i1-Q4_0 | 4.8 | fast, low quality | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q4_K_S.gguf) | i1-Q4_K_S | 4.8 | optimal size/speed/quality | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q4_K_M.gguf) | i1-Q4_K_M | 5.0 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q5_K_S.gguf) | i1-Q5_K_S | 5.7 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q5_K_M.gguf) | i1-Q5_K_M | 5.8 | | | [GGUF](https://huggingface.co/mradermacher/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2-i1-GGUF/resolve/main/Mirai-Nova-Llama3-LocalAI-Unchained-8B-v0.2.i1-Q6_K.gguf) | i1-Q6_K | 6.7 | practically like static Q6_K | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. Additional thanks to [@nicoboss](https://huggingface.co/nicoboss) for giving me access to his hardware for calculating the imatrix for these quants. <!-- end -->