modelId
stringlengths
4
111
lastModified
stringlengths
24
24
tags
list
pipeline_tag
stringlengths
5
30
author
stringlengths
2
34
config
null
securityStatus
null
id
stringlengths
4
111
likes
int64
0
9.53k
downloads
int64
2
73.6M
library_name
stringlengths
2
84
created
timestamp[us]
card
stringlengths
101
901k
card_len
int64
101
901k
embeddings
list
ssarae/dreambooth_pingu_ver
2023-10-07T01:36:29.000Z
[ "diffusers", "tensorboard", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "lora", "license:creativeml-openrail-m", "has_space", "region:us" ]
text-to-image
ssarae
null
null
ssarae/dreambooth_pingu_ver
0
490
diffusers
2023-10-06T20:48:04
--- license: creativeml-openrail-m base_model: runwayml/stable-diffusion-v1-5 instance_prompt: A rqlaks pingu tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - lora inference: true --- # LoRA DreamBooth - ssarae/dreambooth_pingu_ver These are LoRA adaption weights for runwayml/stable-diffusion-v1-5. The weights were trained on A rqlaks pingu using [DreamBooth](https://dreambooth.github.io/). You can find some example images in the following. ![img_0](./image_0.png) ![img_1](./image_1.png) ![img_2](./image_2.png) ![img_3](./image_3.png) LoRA for the text encoder was enabled: False.
633
[ [ -0.0060577392578125, -0.036834716796875, 0.0189361572265625, 0.01953125, -0.04254150390625, 0.0160980224609375, 0.033599853515625, -0.0125579833984375, 0.05609130859375, 0.04205322265625, -0.05206298828125, -0.034820556640625, -0.0428466796875, -0.0145111083...
lmsys/vicuna-7b-delta-v0
2023-08-01T18:24:28.000Z
[ "transformers", "pytorch", "llama", "text-generation", "arxiv:2302.13971", "arxiv:2306.05685", "has_space", "text-generation-inference", "region:us" ]
text-generation
lmsys
null
null
lmsys/vicuna-7b-delta-v0
151
489
transformers
2023-04-06T01:12:08
--- inference: false --- **NOTE: New version available** Please check out a newer version of the weights [here](https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md). **NOTE: This "delta model" cannot be used directly.** Users have to apply it on top of the original LLaMA weights to get actual Vicuna weights. See [instructions](https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md#how-to-apply-delta-weights-for-weights-v11-and-v0). <br> <br> # Vicuna Model Card ## Model Details Vicuna is a chat assistant trained by fine-tuning LLaMA on user-shared conversations collected from ShareGPT. - **Developed by:** [LMSYS](https://lmsys.org/) - **Model type:** An auto-regressive language model based on the transformer architecture. - **License:** Non-commercial license - **Finetuned from model:** [LLaMA](https://arxiv.org/abs/2302.13971). ### Model Sources - **Repository:** https://github.com/lm-sys/FastChat - **Blog:** https://lmsys.org/blog/2023-03-30-vicuna/ - **Paper:** https://arxiv.org/abs/2306.05685 - **Demo:** https://chat.lmsys.org/ ## Uses The primary use of Vicuna is research on large language models and chatbots. The primary intended users of the model are researchers and hobbyists in natural language processing, machine learning, and artificial intelligence. ## How to Get Started with the Model Command line interface: https://github.com/lm-sys/FastChat#vicuna-weights. APIs (OpenAI API, Huggingface API): https://github.com/lm-sys/FastChat/tree/main#api. ## Training Details Vicuna v0 is fine-tuned from LLaMA with supervised instruction fine-tuning. The training data is around 70K conversations collected from ShareGPT.com. See more details in the "Training Details of Vicuna Models" section in the appendix of this [paper](https://arxiv.org/pdf/2306.05685.pdf). ## Evaluation Vicuna is evaluated with standard benchmarks, human preference, and LLM-as-a-judge. See more details in this [paper](https://arxiv.org/pdf/2306.05685.pdf) and [leaderboard](https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard). ## Difference between different versions of Vicuna See [vicuna_weights_version.md](https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md)
2,271
[ [ -0.0151214599609375, -0.06402587890625, 0.02587890625, 0.036895751953125, -0.042633056640625, -0.015411376953125, -0.0175628662109375, -0.042724609375, 0.031768798828125, 0.0306396484375, -0.045074462890625, -0.039825439453125, -0.0460205078125, -0.000442743...
sobabeats/Evt_V2
2023-04-17T11:07:19.000Z
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "anime", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
sobabeats
null
null
sobabeats/Evt_V2
0
489
diffusers
2023-04-17T11:07:19
--- tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - anime - diffusers license: creativeml-openrail-m duplicated_from: haor/Evt_V2 --- # Evt_V2 Based on animefull-latest, fine-tuned using a training set of 15000 images (7700 flipped). Most of the training set uses [pixiv_AI_crawler](https://github.com/7eu7d7/pixiv_AI_crawler) to filter the pixiv daily ranking, and then mixes some nsfw animation images. ### Examples ![Image](https://0.00000.link/1121/1669040927.jpg) ![Image](https://0.00000.link/1122/1669088826.png) ![Image](https://0.00000.link/1121/1669041182.jpg) ![Image](https://0.00000.link/1121/1668968933.png) ![Image](https://0.00000.link/1121/1668969239.png) ``` best quality, illustration,highly detailed,1girl,upper body,beautiful detailed eyes, medium_breasts, long hair,grey hair, grey eyes, curly hair, bangs,empty eyes,expressionless, ((masterpiece)),twintails,beautiful detailed sky, beautiful detailed water, cinematic lighting, dramatic angle,((back to the viewer)),(an extremely delicate and beautiful),school uniform,black ribbon,light smile, Negative prompt: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry,artist name,bad feet Steps: 40, Sampler: Euler a, CFG scale: 7, Clip skip: 2 *evt_bs6_ema is the first version of evt ``` ![Image](https://0.00000.link/1121/1669040982.jpg) ![Image](https://0.00000.link/1121/1669040981.jpg) ![Image](https://0.00000.link/1121/1668982508.png) ![Image](https://0.00000.link/1121/1668969770.png) ``` {Masterpiece, Kaname_Madoka, tall and long double tails, well rooted hair, (pink hair), pink eyes, crossed bangs, ojousama, jk, thigh bandages, wrist cuffs, (pink bow: 1.2)}, plain color, sketch, masterpiece, high detail, masterpiece portrait, best quality, ray tracing, {:<, look at the edge} Negative prompt: ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)),extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((bad proportions))), ((extra limbs)), (((deformed))), (((disfigured))), cloned face, gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), too many fingers, (((long neck))), (((low quality))), normal quality, blurry, bad feet, text font ui, ((((worst quality)))), anatomical nonsense, (((bad shadow))), unnatural body, liquid body, 3D, 3D game, 3D game scene, 3D character, bad hairs, poorly drawn hairs, fused hairs, big muscles, bad face, extra eyes, furry, pony, mosaic, disappearing calf, disappearing legs, extra digit, fewer digit, fused digit, missing digit, fused feet, poorly drawn eyes, big face, long face, bad eyes, thick lips, obesity, strong girl, beard,Excess legs Steps: 40, Sampler: Euler a, CFG scale: 6,Clip skip: 2 ```
2,878
[ [ -0.04833984375, -0.06011962890625, 0.032806396484375, 0.0088958740234375, -0.02642822265625, -0.0022640228271484375, 0.03460693359375, -0.043487548828125, 0.0361328125, 0.036773681640625, -0.055145263671875, -0.041107177734375, -0.041107177734375, 0.01976013...
patrickvonplaten/bert2gpt2-cnn_dailymail-fp16
2021-08-18T14:38:10.000Z
[ "transformers", "pytorch", "jax", "encoder_decoder", "text2text-generation", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text2text-generation
patrickvonplaten
null
null
patrickvonplaten/bert2gpt2-cnn_dailymail-fp16
6
488
transformers
2022-03-02T23:29:05
# Bert2GPT2 Summarization with 🤗 EncoderDecoder Framework This model is a Bert2Bert model fine-tuned on summarization. Bert2GPT2 is a `EncoderDecoderModel`, meaning that the encoder is a `bert-base-uncased` BERT model and the decoder is a `gpt2` GPT2 model. Leveraging the [EncoderDecoderFramework](https://huggingface.co/transformers/model_doc/encoderdecoder.html#encoder-decoder-models), the two pretrained models can simply be loaded into the framework via: ```python bert2gpt2 = EncoderDecoderModel.from_encoder_decoder_pretrained("bert-base-uncased", "gpt2") ``` The decoder of an `EncoderDecoder` model needs cross-attention layers and usually makes use of causal masking for auto-regressiv generation. Thus, ``bert2gpt2`` is consequently fined-tuned on the `CNN/Daily Mail`dataset and the resulting model `bert2gpt2-cnn_dailymail-fp16` is uploaded here. ## Example The model is by no means a state-of-the-art model, but nevertheless produces reasonable summarization results. It was mainly fine-tuned as a proof-of-concept for the 🤗 EncoderDecoder Framework. The model can be used as follows: ```python from transformers import BertTokenizer, GPT2Tokenizer, EncoderDecoderModel model = EncoderDecoderModel.from_pretrained("patrickvonplaten/bert2gpt2-cnn_dailymail-fp16") # reuse tokenizer from bert2bert encoder-decoder model bert_tokenizer = BertTokenizer.from_pretrained("patrickvonplaten/bert2bert-cnn_dailymail-fp16") article = """(CNN)Sigma Alpha Epsilon is under fire for a video showing party-bound fraternity members singing a racist chant. SAE's national chapter suspended the students, but University of Oklahoma President David B oren took it a step further, saying the university's affiliation with the fraternity is permanently done. The news is shocking, but it's not the first time SAE has faced controversy. SAE was founded March 9, 185 6, at the University of Alabama, five years before the American Civil War, according to the fraternity website. When the war began, the group had fewer than 400 members, of which "369 went to war for the Confede rate States and seven for the Union Army," the website says. The fraternity now boasts more than 200,000 living alumni, along with about 15,000 undergraduates populating 219 chapters and 20 "colonies" seeking fu ll membership at universities. SAE has had to work hard to change recently after a string of member deaths, many blamed on the hazing of new recruits, SAE national President Bradley Cohen wrote in a message on t he fraternity's website. The fraternity's website lists more than 130 chapters cited or suspended for "health and safety incidents" since 2010. At least 30 of the incidents involved hazing, and dozens more invol ved alcohol. However, the list is missing numerous incidents from recent months. Among them, according to various media outlets: Yale University banned the SAEs from campus activities last month after members al legedly tried to interfere with a sexual misconduct investigation connected to an initiation rite. Stanford University in December suspended SAE housing privileges after finding sorority members attending a frat ernity function were subjected to graphic sexual content. And Johns Hopkins University in November suspended the fraternity for underage drinking. "The media has labeled us as the 'nation's deadliest fraternity, ' " Cohen said. In 2011, for example, a student died while being coerced into excessive alcohol consumption, according to a lawsuit. SAE's previous insurer dumped the fraternity. "As a result, we are paying Lloy d's of London the highest insurance rates in the Greek-letter world," Cohen said. Universities have turned down SAE's attempts to open new chapters, and the fraternity had to close 12 in 18 months over hazing in cidents.""" input_ids = bert_tokenizer(article, return_tensors="pt").input_ids output_ids = model.generate(input_ids) # we need a gpt2 tokenizer for the output word embeddings gpt2_tokenizer = GPT2Tokenizer.from_pretrained("gpt2") print(gpt2_tokenizer.decode(output_ids[0], skip_special_tokens=True)) # should produce # SAE's national chapter suspended the students, but university president says it's permanent. # The fraternity has had to deal with a string of incidents since 2010. # SAE has more than 200,000 members, many of whom are students. # A student died while being coerced into drinking alcohol. ``` ## Training script: **IMPORTANT**: In order for this code to work, make sure you checkout to the branch [more_general_trainer_metric](https://github.com/huggingface/transformers/tree/more_general_trainer_metric), which slightly adapts the `Trainer` for `EncoderDecoderModels` according to this PR: https://github.com/huggingface/transformers/pull/5840. The following code shows the complete training script that was used to fine-tune `bert2gpt2-cnn_dailymail-fp16 ` for reproducability. The training last ~11h on a standard GPU. ```python #!/usr/bin/env python3 import nlp import logging from transformers import BertTokenizer, GPT2Tokenizer, EncoderDecoderModel, Trainer, TrainingArguments logging.basicConfig(level=logging.INFO) model = EncoderDecoderModel.from_encoder_decoder_pretrained("bert-base-cased", "gpt2") # cache is currently not supported by EncoderDecoder framework model.decoder.config.use_cache = False bert_tokenizer = BertTokenizer.from_pretrained("bert-base-cased") # CLS token will work as BOS token bert_tokenizer.bos_token = bert_tokenizer.cls_token # SEP token will work as EOS token bert_tokenizer.eos_token = bert_tokenizer.sep_token # make sure GPT2 appends EOS in begin and end def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): outputs = [self.bos_token_id] + token_ids_0 + [self.eos_token_id] return outputs GPT2Tokenizer.build_inputs_with_special_tokens = build_inputs_with_special_tokens gpt2_tokenizer = GPT2Tokenizer.from_pretrained("gpt2") # set pad_token_id to unk_token_id -> be careful here as unk_token_id == eos_token_id == bos_token_id gpt2_tokenizer.pad_token = gpt2_tokenizer.unk_token # set decoding params model.config.decoder_start_token_id = gpt2_tokenizer.bos_token_id model.config.eos_token_id = gpt2_tokenizer.eos_token_id model.config.max_length = 142 model.config.min_length = 56 model.config.no_repeat_ngram_size = 3 model.early_stopping = True model.length_penalty = 2.0 model.num_beams = 4 # load train and validation data train_dataset = nlp.load_dataset("cnn_dailymail", "3.0.0", split="train") val_dataset = nlp.load_dataset("cnn_dailymail", "3.0.0", split="validation[:5%]") # load rouge for validation rouge = nlp.load_metric("rouge", experiment_id=1) encoder_length = 512 decoder_length = 128 batch_size = 16 # map data correctly def map_to_encoder_decoder_inputs(batch): # Tokenizer will automatically set [BOS] <text> [EOS] # use bert tokenizer here for encoder inputs = bert_tokenizer(batch["article"], padding="max_length", truncation=True, max_length=encoder_length) # force summarization <= 128 outputs = gpt2_tokenizer(batch["highlights"], padding="max_length", truncation=True, max_length=decoder_length) batch["input_ids"] = inputs.input_ids batch["attention_mask"] = inputs.attention_mask batch["decoder_input_ids"] = outputs.input_ids batch["labels"] = outputs.input_ids.copy() batch["decoder_attention_mask"] = outputs.attention_mask # complicated list comprehension here because pad_token_id alone is not good enough to know whether label should be excluded or not batch["labels"] = [ [-100 if mask == 0 else token for mask, token in mask_and_tokens] for mask_and_tokens in [zip(masks, labels) for masks, labels in zip(batch["decoder_attention_mask"], batch["labels"])] ] assert all([len(x) == encoder_length for x in inputs.input_ids]) assert all([len(x) == decoder_length for x in outputs.input_ids]) return batch def compute_metrics(pred): labels_ids = pred.label_ids pred_ids = pred.predictions # all unnecessary tokens are removed pred_str = gpt2_tokenizer.batch_decode(pred_ids, skip_special_tokens=True) labels_ids[labels_ids == -100] = gpt2_tokenizer.eos_token_id label_str = gpt2_tokenizer.batch_decode(labels_ids, skip_special_tokens=True) rouge_output = rouge.compute(predictions=pred_str, references=label_str, rouge_types=["rouge2"])["rouge2"].mid return { "rouge2_precision": round(rouge_output.precision, 4), "rouge2_recall": round(rouge_output.recall, 4), "rouge2_fmeasure": round(rouge_output.fmeasure, 4), } # make train dataset ready train_dataset = train_dataset.map( map_to_encoder_decoder_inputs, batched=True, batch_size=batch_size, remove_columns=["article", "highlights"], ) train_dataset.set_format( type="torch", columns=["input_ids", "attention_mask", "decoder_input_ids", "decoder_attention_mask", "labels"], ) # same for validation dataset val_dataset = val_dataset.map( map_to_encoder_decoder_inputs, batched=True, batch_size=batch_size, remove_columns=["article", "highlights"], ) val_dataset.set_format( type="torch", columns=["input_ids", "attention_mask", "decoder_input_ids", "decoder_attention_mask", "labels"], ) # set training arguments - these params are not really tuned, feel free to change training_args = TrainingArguments( output_dir="./", per_device_train_batch_size=batch_size, per_device_eval_batch_size=batch_size, predict_from_generate=True, evaluate_during_training=True, do_train=True, do_eval=True, logging_steps=1000, save_steps=1000, eval_steps=1000, overwrite_output_dir=True, warmup_steps=2000, save_total_limit=10, fp16=True, ) # instantiate trainer trainer = Trainer( model=model, args=training_args, compute_metrics=compute_metrics, train_dataset=train_dataset, eval_dataset=val_dataset, ) # start training trainer.train() ``` ## Evaluation The following script evaluates the model on the test set of CNN/Daily Mail. ```python #!/usr/bin/env python3 import nlp from transformers import BertTokenizer, GPT2Tokenizer, EncoderDecoderModel model = EncoderDecoderModel.from_pretrained("patrickvonplaten/bert2gpt2-cnn_dailymail-fp16") model.to("cuda") bert_tokenizer = BertTokenizer.from_pretrained("bert-base-cased") # CLS token will work as BOS token bert_tokenizer.bos_token = bert_tokenizer.cls_token # SEP token will work as EOS token bert_tokenizer.eos_token = bert_tokenizer.sep_token # make sure GPT2 appends EOS in begin and end def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): outputs = [self.bos_token_id] + token_ids_0 + [self.eos_token_id] return outputs GPT2Tokenizer.build_inputs_with_special_tokens = build_inputs_with_special_tokens gpt2_tokenizer = GPT2Tokenizer.from_pretrained("gpt2") # set pad_token_id to unk_token_id -> be careful here as unk_token_id == eos_token_id == bos_token_id gpt2_tokenizer.pad_token = gpt2_tokenizer.unk_token # set decoding params model.config.decoder_start_token_id = gpt2_tokenizer.bos_token_id model.config.eos_token_id = gpt2_tokenizer.eos_token_id model.config.max_length = 142 model.config.min_length = 56 model.config.no_repeat_ngram_size = 3 model.early_stopping = True model.length_penalty = 2.0 model.num_beams = 4 test_dataset = nlp.load_dataset("cnn_dailymail", "3.0.0", split="test") batch_size = 64 # map data correctly def generate_summary(batch): # Tokenizer will automatically set [BOS] <text> [EOS] # cut off at BERT max length 512 inputs = bert_tokenizer(batch["article"], padding="max_length", truncation=True, max_length=512, return_tensors="pt") input_ids = inputs.input_ids.to("cuda") attention_mask = inputs.attention_mask.to("cuda") outputs = model.generate(input_ids, attention_mask=attention_mask) # all special tokens including will be removed output_str = gpt2_tokenizer.batch_decode(outputs, skip_special_tokens=True) batch["pred"] = output_str return batch results = test_dataset.map(generate_summary, batched=True, batch_size=batch_size, remove_columns=["article"]) # load rouge for validation rouge = nlp.load_metric("rouge") pred_str = results["pred"] label_str = results["highlights"] rouge_output = rouge.compute(predictions=pred_str, references=label_str, rouge_types=["rouge2"])["rouge2"].mid print(rouge_output) ``` The obtained results should be: | - | Rouge2 - mid -precision | Rouge2 - mid - recall | Rouge2 - mid - fmeasure | |----------|:-------------:|:------:|:------:| | **CNN/Daily Mail** | 14.42 | 16.99 | **15.16** |
12,654
[ [ -0.0257720947265625, -0.0513916015625, 0.006072998046875, 0.0199737548828125, -0.02728271484375, -0.01971435546875, -0.0171661376953125, -0.0308685302734375, 0.0219268798828125, 0.006923675537109375, -0.0323486328125, -0.0205841064453125, -0.06494140625, 0.0...
pile-of-law/legalbert-large-1.7M-2
2023-06-06T20:10:02.000Z
[ "transformers", "pytorch", "bert", "legal", "fill-mask", "en", "dataset:pile-of-law/pile-of-law", "arxiv:1907.11692", "arxiv:1810.04805", "arxiv:2110.00976", "arxiv:2207.00220", "endpoints_compatible", "region:us" ]
fill-mask
pile-of-law
null
null
pile-of-law/legalbert-large-1.7M-2
28
488
transformers
2022-04-29T18:27:57
--- language: - en datasets: - pile-of-law/pile-of-law pipeline_tag: fill-mask tags: - legal --- # Pile of Law BERT large model 2 (uncased) Pretrained model on English language legal and administrative text using the [RoBERTa](https://arxiv.org/abs/1907.11692) pretraining objective. This model was trained with the same setup as [pile-of-law/legalbert-large-1.7M-1](https://huggingface.co/pile-of-law/legalbert-large-1.7M-1), but with a different seed. ## Model description Pile of Law BERT large 2 is a transformers model with the [BERT large model (uncased)](https://huggingface.co/bert-large-uncased) architecture pretrained on the [Pile of Law](https://huggingface.co/datasets/pile-of-law/pile-of-law), a dataset consisting of ~256GB of English language legal and administrative text for language model pretraining. ## Intended uses & limitations You can use the raw model for masked language modeling or fine-tune it for a downstream task. Since this model was pretrained on a English language legal and administrative text corpus, legal downstream tasks will likely be more in-domain for this model. ## How to use You can use the model directly with a pipeline for masked language modeling: ```python >>> from transformers import pipeline >>> pipe = pipeline(task='fill-mask', model='pile-of-law/legalbert-large-1.7M-2') >>> pipe("An [MASK] is a request made after a trial by a party that has lost on one or more issues that a higher court review the decision to determine if it was correct.") [{'sequence': 'an exception is a request made after a trial by a party that has lost on one or more issues that a higher court review the decision to determine if it was correct.', 'score': 0.5218929052352905, 'token': 4028, 'token_str': 'exception'}, {'sequence': 'an appeal is a request made after a trial by a party that has lost on one or more issues that a higher court review the decision to determine if it was correct.', 'score': 0.11434809118509293, 'token': 1151, 'token_str': 'appeal'}, {'sequence': 'an exclusion is a request made after a trial by a party that has lost on one or more issues that a higher court review the decision to determine if it was correct.', 'score': 0.06454459577798843, 'token': 5345, 'token_str': 'exclusion'}, {'sequence': 'an example is a request made after a trial by a party that has lost on one or more issues that a higher court review the decision to determine if it was correct.', 'score': 0.043593790382146835, 'token': 3677, 'token_str': 'example'}, {'sequence': 'an objection is a request made after a trial by a party that has lost on one or more issues that a higher court review the decision to determine if it was correct.', 'score': 0.03758585825562477, 'token': 3542, 'token_str': 'objection'}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('pile-of-law/legalbert-large-1.7M-2') model = BertModel.from_pretrained('pile-of-law/legalbert-large-1.7M-2') 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 BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('pile-of-law/legalbert-large-1.7M-2') model = TFBertModel.from_pretrained('pile-of-law/legalbert-large-1.7M-2') text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` ## Limitations and bias Please see Appendix G of the Pile of Law paper for copyright limitations related to dataset and model use. This model can have biased predictions. In the following example where the model is used with a pipeline for masked language modeling, for the race descriptor of the criminal, the model predicts a higher score for "black" than "white". ```python >>> from transformers import pipeline >>> pipe = pipeline(task='fill-mask', model='pile-of-law/legalbert-large-1.7M-2') >>> pipe("The transcript of evidence reveals that at approximately 7:30 a. m. on January 22, 1973, the prosecutrix was awakened in her home in DeKalb County by the barking of the family dog, and as she opened her eyes she saw a [MASK] man standing beside her bed with a gun.", targets=["black", "white"]) [{'sequence': 'the transcript of evidence reveals that at approximately 7 : 30 a. m. on january 22, 1973, the prosecutrix was awakened in her home in dekalb county by the barking of the family dog, and as she opened her eyes she saw a black man standing beside her bed with a gun.', 'score': 0.02685137465596199, 'token': 4311, 'token_str': 'black'}, {'sequence': 'the transcript of evidence reveals that at approximately 7 : 30 a. m. on january 22, 1973, the prosecutrix was awakened in her home in dekalb county by the barking of the family dog, and as she opened her eyes she saw a white man standing beside her bed with a gun.', 'score': 0.013632853515446186, 'token': 4249, 'token_str': 'white'}] ``` This bias will also affect all fine-tuned versions of this model. ## Training data The Pile of Law BERT large model was pretrained on the Pile of Law, a dataset consisting of ~256GB of English language legal and administrative text for language model pretraining. The Pile of Law consists of 35 data sources, including legal analyses, court opinions and filings, government agency publications, contracts, statutes, regulations, casebooks, etc. We describe the data sources in detail in Appendix E of the Pile of Law paper. The Pile of Law dataset is placed under a CreativeCommons Attribution-NonCommercial-ShareAlike 4.0 International license. ## Training procedure ### Preprocessing The model vocabulary consists of 29,000 tokens from a custom word-piece vocabulary fit to Pile of Law using the [HuggingFace WordPiece tokenizer](https://github.com/huggingface/tokenizers) and 3,000 randomly sampled legal terms from Black's Law Dictionary, for a vocabulary size of 32,000 tokens. The 80-10-10 masking, corruption, leave split, as in [BERT](https://arxiv.org/abs/1810.04805), is used, with a replication rate of 20 to create different masks for each context. To generate sequences, we use the [LexNLP sentence segmenter](https://github.com/LexPredict/lexpredict-lexnlp), which handles sentence segmentation for legal citations (which are often falsely mistaken as sentences). The input is formatted by filling sentences until they comprise 256 tokens, followed by a [SEP] token, and then filling sentences such that the entire span is under 512 tokens. If the next sentence in the series is too large, it is not added, and the remaining context length is filled with padding tokens. ### Pretraining The model was trained on a SambaNova cluster, with 8 RDUs, for 1.7 million steps. We used a smaller learning rate of 5e-6 and batch size of 128, to mitigate training instability, potentially due to the diversity of sources in our training data. The masked language modeling (MLM) objective without NSP loss, as described in [RoBERTa](https://arxiv.org/abs/1907.11692), was used for pretraining. The model was pretrained with 512 length sequence lengths for all steps. We trained two models with the same setup in parallel model training runs, with different random seeds. We selected the lowest log likelihood model, [pile-of-law/legalbert-large-1.7M-1](https://huggingface.co/pile-of-law/legalbert-large-1.7M-1), which we refer to as PoL-BERT-Large, for experiments, but also release the second model, [pile-of-law/legalbert-large-1.7M-2](https://huggingface.co/pile-of-law/legalbert-large-1.7M-2). ## Evaluation results See the model card for [pile-of-law/legalbert-large-1.7M-1](https://huggingface.co/pile-of-law/legalbert-large-1.7M-1) for finetuning results on the CaseHOLD variant provided by the [LexGLUE paper](https://arxiv.org/abs/2110.00976). ### BibTeX entry and citation info ```bibtex @misc{hendersonkrass2022pileoflaw, url = {https://arxiv.org/abs/2207.00220}, author = {Henderson, Peter and Krass, Mark S. and Zheng, Lucia and Guha, Neel and Manning, Christopher D. and Jurafsky, Dan and Ho, Daniel E.}, title = {Pile of Law: Learning Responsible Data Filtering from the Law and a 256GB Open-Source Legal Dataset}, publisher = {arXiv}, year = {2022} } ```
8,434
[ [ -0.01885986328125, -0.04925537109375, 0.027740478515625, 0.011444091796875, -0.040252685546875, -0.016632080078125, -0.00804901123046875, -0.019012451171875, 0.0189208984375, 0.057098388671875, -0.0167694091796875, -0.035064697265625, -0.06207275390625, -0.0...
classla/xlm-roberta-base-multilingual-text-genre-classifier
2023-10-05T10:34:56.000Z
[ "transformers", "pytorch", "safetensors", "xlm-roberta", "text-classification", "genre", "text-genre", "multilingual", "af", "am", "ar", "as", "az", "be", "bg", "bn", "br", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi",...
text-classification
classla
null
null
classla/xlm-roberta-base-multilingual-text-genre-classifier
17
488
transformers
2022-11-11T09:33:55
--- license: cc-by-sa-4.0 language: - multilingual - af - am - ar - as - az - be - bg - bn - br - bs - ca - cs - cy - da - de - el - en - eo - es - et - eu - fa - fi - fr - fy - ga - gd - gl - gu - ha - he - hi - hr - hu - hy - id - is - it - ja - jv - ka - kk - km - kn - ko - ku - ky - la - lo - lt - lv - mg - mk - ml - mn - mr - ms - my - ne - nl - no - om - or - pa - pl - ps - pt - ro - ru - sa - sd - si - sk - sl - so - sq - sr - su - sv - sw - ta - te - th - tl - tr - ug - uk - ur - uz - vi - xh - yi - zh tags: - text-classification - genre - text-genre widget: - text: "On our site, you can find a great genre identification model which you can use for thousands of different tasks. For free!" example_title: "English" - text: "Na naši spletni strani lahko najdete odličen model za prepoznavanje žanrov, ki ga lahko uporabite pri na tisoče različnih nalogah. In to brezplačno!" example_title: "Slovene" - text: "Sur notre site, vous trouverez un modèle d'identification de genre très intéressant que vous pourrez utiliser pour des milliers de tâches différentes. C'est gratuit !" example_title: "French" --- # X-GENRE classifier - multilingual text genre classifier Text classification model based on [`xlm-roberta-base`](https://huggingface.co/xlm-roberta-base) and fine-tuned on a combination of three genre datasets: Slovene GINCO<sup>1</sup> dataset, the English CORE<sup>2</sup> dataset and the English FTD<sup>3</sup> dataset. The model can be used for automatic genre identification, applied to any text in a language, supported by the `xlm-roberta-base`. ## Model description The model was fine-tuned on the "X-GENRE" dataset which consists of three genre datasets: CORE, FTD and GINCO dataset. Each of the datasets has their own genre schema, so they were combined into a joint schema ("X-GENRE" schema) based on the comparison of labels and cross-dataset experiments (described in details [here](https://github.com/TajaKuzman/Genre-Datasets-Comparison/tree/main/Creation-of-classifiers-and-cross-prediction#joint-schema-x-genre)). ### Fine-tuning hyperparameters Fine-tuning was performed with `simpletransformers`. Beforehand, a brief hyperparameter optimization was performed and the presumed optimal hyperparameters are: ```python model_args= { "num_train_epochs": 15, "learning_rate": 1e-5, "max_seq_length": 512, } ``` ## Intended use and limitations ## Usage An example of preparing data for genre identification and post-processing of the results can be found [here](https://github.com/TajaKuzman/Applying-GENRE-on-MaCoCu-bilingual) where we applied X-GENRE classifier to the English part of [MaCoCu](https://macocu.eu/) parallel corpora. For reliable results, genre classifier should be applied to documents of sufficient length (the rule of thumbs is at least 75 words). It is advised that the predictions, predicted with confidence lower than 0.9, are not used. Furthermore, the label "Other" can be used as another indicator of low confidence of the predictions, as it often indicates that the text does not have enough features of any genre, and these predictions can be discarded as well. After proposed post-processing (removal of low-confidence predictions, labels "Other" and in this specific case also label "Forum"), the performance on the MaCoCu data based on manual inspection reached macro and micro F1 of 0.92. ### Use examples ```python from simpletransformers.classification import ClassificationModel model_args= { "num_train_epochs": 15, "learning_rate": 1e-5, "max_seq_length": 512, "silent": True } model = ClassificationModel( "xlmroberta", "classla/xlm-roberta-base-multilingual-text-genre-classifier", use_cuda=True, args=model_args ) predictions, logit_output = model.predict(["How to create a good text classification model? First step is to prepare good data. Make sure not to skip the exploratory data analysis. Pre-process the text if necessary for the task. The next step is to perform hyperparameter search to find the optimum hyperparameters. After fine-tuning the model, you should look into the predictions and analyze the model's performance. You might want to perform the post-processing of data as well and keep only reliable predictions.", "On our site, you can find a great genre identification model which you can use for thousands of different tasks. With our model, you can fastly and reliably obtain high-quality genre predictions and explore which genres exist in your corpora. Available for free!"] ) predictions # Output: array([3, 8]) [model.config.id2label[i] for i in predictions] # Output: ['Instruction', 'Promotion'] ``` Use example for prediction on a dataset, using batch processing, is available via [Google Collab](https://colab.research.google.com/drive/1yC4L_p2t3oMViC37GqSjJynQH-EWyhLr?usp=sharing). ## X-GENRE categories List of labels: ``` labels_list=['Other', 'Information/Explanation', 'News', 'Instruction', 'Opinion/Argumentation', 'Forum', 'Prose/Lyrical', 'Legal', 'Promotion'], labels_map={'Other': 0, 'Information/Explanation': 1, 'News': 2, 'Instruction': 3, 'Opinion/Argumentation': 4, 'Forum': 5, 'Prose/Lyrical': 6, 'Legal': 7, 'Promotion': 8} ``` Description of labels: | Label | Description | Examples | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Information/Explanation | An objective text that describes or presents an event, a person, a thing, a concept etc. Its main purpose is to inform the reader about something. Common features: objective/factual, explanation/definition of a concept (x is …), enumeration. | research article, encyclopedia article, informational blog, product specification, course materials, general information, job description, manual, horoscope, travel guide, glossaries, historical article, biographical story/history. | | Instruction | An objective text which instructs the readers on how to do something. Common features: multiple steps/actions, chronological order, 1st person plural or 2nd person, modality (must, have to, need to, can, etc.), adverbial clauses of manner (in a way that), of condition (if), of time (after …). | how-to texts, recipes, technical support | | Legal | An objective formal text that contains legal terms and is clearly structured. The name of the text type is often included in the headline (contract, rules, amendment, general terms and conditions, etc.). Common features: objective/factual, legal terms, 3rd person. | small print, software license, proclamation, terms and conditions, contracts, law, copyright notices, university regulation | | News | An objective or subjective text which reports on an event recent at the time of writing or coming in the near future. Common features: adverbs/adverbial clauses of time and/or place (dates, places), many proper nouns, direct or reported speech, past tense. | news report, sports report, travel blog, reportage, police report, announcement | | Opinion/Argumentation | A subjective text in which the authors convey their opinion or narrate their experience. It includes promotion of an ideology and other non-commercial causes. This genre includes a subjective narration of a personal experience as well. Common features: adjectives/adverbs that convey opinion, words that convey (un)certainty (certainly, surely), 1st person, exclamation marks. | review, blog (personal blog, travel blog), editorial, advice, letter to editor, persuasive article or essay, formal speech, pamphlet, political propaganda, columns, political manifesto | | Promotion | A subjective text intended to sell or promote an event, product, or service. It addresses the readers, often trying to convince them to participate in something or buy something. Common features: contains adjectives/adverbs that promote something (high-quality, perfect, amazing), comparative and superlative forms of adjectives and adverbs (the best, the greatest, the cheapest), addressing the reader (usage of 2nd person), exclamation marks. | advertisement, promotion of a product (e-shops), promotion of an accommodation, promotion of company's services, invitation to an event | | Forum | A text in which people discuss a certain topic in form of comments. Common features: multiple authors, informal language, subjective (the writers express their opinions), written in 1st person. | discussion forum, reader/viewer responses, QA forum | | Prose/Lyrical | A literary text that consists of paragraphs or verses. A literary text is deemed to have no other practical purpose than to give pleasure to the reader. Often the author pays attention to the aesthetic appearance of the text. It can be considered as art. | lyrics, poem, prayer, joke, novel, short story | | Other | A text that which does not fall under any of other genre categories. | | ## Performance ### Comparison with other models at in-dataset and cross-dataset experiments The X-GENRE model was compared with `xlm-roberta-base` classifiers, fine-tuned on each of genre datasets separately, using the X-GENRE schema (see experiments in https://github.com/TajaKuzman/Genre-Datasets-Comparison). At the in-dataset experiments (trained and tested on splits of the same dataset), it outperforms all datasets, except the FTD dataset which has a smaller number of X-GENRE labels. | Trained on | Micro F1 | Macro F1 | |:-------------|-----------:|-----------:| | FTD | 0.843 | 0.851 | | X-GENRE | 0.797 | 0.794 | | CORE | 0.778 | 0.627 | | GINCO | 0.754 | 0.75 | When applied on test splits of each of the datasets, the classifier performs well: | Trained on | Tested on | Micro F1 | Macro F1 | |:-------------|:------------|-----------:|-----------:| | X-GENRE | CORE | 0.837 | 0.859 | | X-GENRE | FTD | 0.804 | 0.809 | | X-GENRE | X-GENRE | 0.797 | 0.794 | | X-GENRE | X-GENRE-dev | 0.784 | 0.784 | | X-GENRE | GINCO | 0.749 | 0.758 | The classifier was compared with other classifiers on 2 additional genre datasets (to which the X-GENRE schema was mapped): - EN-GINCO: a sample of the English enTenTen20 corpus - [FinCORE](https://github.com/TurkuNLP/FinCORE): Finnish CORE corpus | Trained on | Tested on | Micro F1 | Macro F1 | |:-------------|:------------|-----------:|-----------:| | X-GENRE | EN-GINCO | 0.688 | 0.691 | | X-GENRE | FinCORE | 0.674 | 0.581 | | GINCO | EN-GINCO | 0.632 | 0.502 | | FTD | EN-GINCO | 0.574 | 0.475 | | CORE | EN-GINCO | 0.485 | 0.422 | At cross-dataset and cross-lingual experiments, it was shown that the X-GENRE classifier, trained on all three datasets, outperforms classifiers that were trained on just one of the datasets. ## Citation If you use the model, please cite the paper which describes creation of the X-GENRE dataset and the genre classifier: ``` @article{kuzman2023automatic, title={Automatic Genre Identification for Robust Enrichment of Massive Text Collections: Investigation of Classification Methods in the Era of Large Language Models}, author={Kuzman, Taja and Mozeti{\v{c}}, Igor and Ljube{\v{s}}i{\'c}, Nikola}, journal={Machine Learning and Knowledge Extraction}, volume={5}, number={3}, pages={1149--1175}, year={2023}, publisher={MDPI} } ```
16,839
[ [ -0.046234130859375, -0.047576904296875, 0.023956298828125, 0.0282135009765625, -0.00849151611328125, 0.024658203125, -0.005680084228515625, -0.0288543701171875, 0.041595458984375, 0.044708251953125, -0.037872314453125, -0.0556640625, -0.05908203125, 0.021331...
dwarfbum/Uber-Realistic-Porn-Merge_URPM
2023-04-09T12:43:30.000Z
[ "diffusers", "Uber Realistic Porn Merge", "URPM", "license:creativeml-openrail-m", "region:us" ]
null
dwarfbum
null
null
dwarfbum/Uber-Realistic-Porn-Merge_URPM
7
488
diffusers
2023-02-12T13:36:36
--- license: creativeml-openrail-m library_name: diffusers tags: - Uber Realistic Porn Merge - URPM --- THIS IS NOT MY MODEL Author: saftle Link to model: https://civitai.com/models/2661/uber-realistic-porn-merge-urpm I just uploaded it on huggingface
257
[ [ -0.032745361328125, -0.034149169921875, 0.0298919677734375, 0.034332275390625, -0.01219940185546875, -0.00745391845703125, 0.0258941650390625, -0.0372314453125, 0.055633544921875, 0.0465087890625, -0.0728759765625, -0.009979248046875, -0.03466796875, 0.00205...
navyatiwari11/my-pet-cat-nxt
2023-07-17T11:10:54.000Z
[ "diffusers", "NxtWave-GenAI-Webinar", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
navyatiwari11
null
null
navyatiwari11/my-pet-cat-nxt
0
488
diffusers
2023-07-17T11:04:50
--- license: creativeml-openrail-m tags: - NxtWave-GenAI-Webinar - text-to-image - stable-diffusion --- ### My-Pet-Cat-nxt Dreambooth model trained by navyatiwari11 following the "Build your own Gen AI model" session by NxtWave. Project Submission Code: OPJU100 Sample pictures of this concept: ![0](https://huggingface.co/navyatiwari11/my-pet-cat-nxt/resolve/main/sample_images/00000-401585607.png)
412
[ [ -0.055877685546875, -0.0205230712890625, 0.0186309814453125, 0.017181396484375, -0.024749755859375, 0.0521240234375, 0.034423828125, -0.022216796875, 0.06573486328125, 0.03924560546875, -0.036041259765625, 0.0002732276916503906, -0.00875091552734375, 0.01333...
TheBloke/Platypus2-70B-Instruct-AWQ
2023-09-27T12:49:59.000Z
[ "transformers", "safetensors", "llama", "text-generation", "en", "dataset:garage-bAInd/Open-Platypus", "dataset:Open-Orca/OpenOrca", "arxiv:2308.07317", "arxiv:2307.09288", "license:cc-by-nc-4.0", "text-generation-inference", "region:us" ]
text-generation
TheBloke
null
null
TheBloke/Platypus2-70B-Instruct-AWQ
0
488
transformers
2023-09-19T01:31:29
--- language: - en license: cc-by-nc-4.0 datasets: - garage-bAInd/Open-Platypus - Open-Orca/OpenOrca model_name: Platypus2 70B Instruct base_model: garage-bAInd/Platypus2-70B-instruct inference: false model_creator: garage-bAInd 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 --> # Platypus2 70B Instruct - AWQ - Model creator: [garage-bAInd](https://huggingface.co/garage-bAInd) - Original model: [Platypus2 70B Instruct](https://huggingface.co/garage-bAInd/Platypus2-70B-instruct) <!-- description start --> ## Description This repo contains AWQ model files for [garage-bAInd's Platypus2 70B Instruct](https://huggingface.co/garage-bAInd/Platypus2-70B-instruct). ### About AWQ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference. It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB. <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Platypus2-70B-Instruct-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Platypus2-70B-Instruct-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Platypus2-70B-Instruct-GGUF) * [garage-bAInd's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/garage-bAInd/Platypus2-70B-instruct) <!-- 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: [garage-bAInd's Platypus2 70B Instruct](https://huggingface.co/garage-bAInd/Platypus2-70B-instruct). <!-- licensing end --> <!-- README_AWQ.md-provided-files start --> ## Provided files and AWQ parameters For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM. Models are released as sharded safetensors files. | Branch | Bits | GS | AWQ Dataset | Seq Len | Size | | ------ | ---- | -- | ----------- | ------- | ---- | | [main](https://huggingface.co/TheBloke/Platypus2-70B-Instruct-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 36.61 GB <!-- README_AWQ.md-provided-files end --> <!-- README_AWQ.md-use-from-vllm start --> ## Serving this model from vLLM Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/). - When using vLLM as a server, pass the `--quantization awq` parameter, for example: ```shell python3 python -m vllm.entrypoints.api_server --model TheBloke/Platypus2-70B-Instruct-AWQ --quantization awq ``` When using vLLM from Python code, pass the `quantization=awq` parameter, for example: ```python from vllm import LLM, SamplingParams prompts = [ "Hello, my name is", "The president of the United States is", "The capital of France is", "The future of AI is", ] sampling_params = SamplingParams(temperature=0.8, top_p=0.95) llm = LLM(model="TheBloke/Platypus2-70B-Instruct-AWQ", quantization="awq") outputs = llm.generate(prompts, sampling_params) # Print the outputs. for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") ``` <!-- README_AWQ.md-use-from-vllm start --> <!-- README_AWQ.md-use-from-python start --> ## How to use this AWQ model from Python code ### Install the necessary packages Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later ```shell pip3 install autoawq ``` If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y autoawq git clone https://github.com/casper-hansen/AutoAWQ cd AutoAWQ pip3 install . ``` ### You can then try the following example code ```python from awq import AutoAWQForCausalLM from transformers import AutoTokenizer model_name_or_path = "TheBloke/Platypus2-70B-Instruct-AWQ" # Load model model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True, trust_remote_code=False, safetensors=True) tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False) 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:") tokens = tokenizer( prompt_template, return_tensors='pt' ).input_ids.cuda() # Generate output generation_output = model.generate( tokens, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, max_new_tokens=512 ) print("Output: ", tokenizer.decode(generation_output[0])) # Inference can also be done using transformers' pipeline from transformers import 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_AWQ.md-use-from-python end --> <!-- README_AWQ.md-compatibility start --> ## Compatibility The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm). [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is not yet compatible with AWQ, but a PR is open which should bring support soon: [TGI PR #781](https://github.com/huggingface/text-generation-inference/issues/781). <!-- README_AWQ.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**: 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: garage-bAInd's Platypus2 70B Instruct # Platypus2-70B-instruct Platypus-70B-instruct is a merge of [`garage-bAInd/Platypus2-70B`](https://huggingface.co/garage-bAInd/Platypus2-70B) and [`upstage/Llama-2-70b-instruct-v2`](https://huggingface.co/upstage/Llama-2-70b-instruct-v2). ![Platty](./Best_Platty_small.jpeg) ### Benchmark Metrics | Metric | Value | |-----------------------|-------| | MMLU (5-shot) | 70.48 | | ARC (25-shot) | 71.84 | | HellaSwag (10-shot) | 87.94 | | TruthfulQA (0-shot) | 62.26 | | Avg. | 73.13 | We use state-of-the-art [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard. Please see below for detailed instructions on reproducing benchmark results. ### Model Details * **Trained by**: **Platypus2-70B** trained by Cole Hunter & Ariel Lee; **Llama-2-70b-instruct** trained by upstageAI * **Model type:** **Platypus2-70B-instruct** is an auto-regressive language model based on the LLaMA 2 transformer architecture. * **Language(s)**: English * **License**: Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/)) ### Prompt Template ``` ### Instruction: <prompt> (without the <>) ### Response: ``` ### Training Dataset `garage-bAInd/Platypus2-70B` trained using STEM and logic based dataset [`garage-bAInd/Open-Platypus`](https://huggingface.co/datasets/garage-bAInd/Open-Platypus). Please see our [paper](https://arxiv.org/abs/2308.07317) and [project webpage](https://platypus-llm.github.io) for additional information. ### Training Procedure `garage-bAInd/Platypus2-70B` was instruction fine-tuned using LoRA on 8 A100 80GB. For training details and inference instructions please see the [Platypus](https://github.com/arielnlee/Platypus) GitHub repo. ### Reproducing Evaluation Results Install LM Evaluation Harness: ``` # clone repository git clone https://github.com/EleutherAI/lm-evaluation-harness.git # change to repo directory cd lm-evaluation-harness # check out the correct commit git checkout b281b0921b636bc36ad05c0b0b0763bd6dd43463 # install pip install -e . ``` Each task was evaluated on a single A100 80GB GPU. ARC: ``` python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-70B-instruct --tasks arc_challenge --batch_size 1 --no_cache --write_out --output_path results/Platypus2-70B-instruct/arc_challenge_25shot.json --device cuda --num_fewshot 25 ``` HellaSwag: ``` python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-70B-instruct --tasks hellaswag --batch_size 1 --no_cache --write_out --output_path results/Platypus2-70B-instruct/hellaswag_10shot.json --device cuda --num_fewshot 10 ``` MMLU: ``` python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-70B-instruct --tasks hendrycksTest-* --batch_size 1 --no_cache --write_out --output_path results/Platypus2-70B-instruct/mmlu_5shot.json --device cuda --num_fewshot 5 ``` TruthfulQA: ``` python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-70B-instruct --tasks truthfulqa_mc --batch_size 1 --no_cache --write_out --output_path results/Platypus2-70B-instruct/truthfulqa_0shot.json --device cuda ``` ### Limitations and bias Llama 2 and fine-tuned variants are a new technology that carries risks with 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 2 and any fine-tuned varient'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 2 variants, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at https://ai.meta.com/llama/responsible-use-guide/ ### Citations ```bibtex @article{platypus2023, title={Platypus: Quick, Cheap, and Powerful Refinement of LLMs}, author={Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz}, booktitle={arXiv preprint arxiv:2308.07317}, year={2023} } ``` ```bibtex @misc{touvron2023llama, title={Llama 2: Open Foundation and Fine-Tuned Chat Models}, author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov year={2023}, eprint={2307.09288}, archivePrefix={arXiv}, } ``` ```bibtex @inproceedings{ hu2022lora, title={Lo{RA}: Low-Rank Adaptation of Large Language Models}, author={Edward J Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen}, booktitle={International Conference on Learning Representations}, year={2022}, url={https://openreview.net/forum?id=nZeVKeeFYf9} } ```
16,604
[ [ -0.036895751953125, -0.052459716796875, 0.0241546630859375, 0.0080108642578125, -0.0255889892578125, -0.006683349609375, 0.0035266876220703125, -0.033416748046875, -0.0036296844482421875, 0.0289154052734375, -0.048126220703125, -0.033111572265625, -0.01988220214...
HooshvareLab/bert-fa-base-uncased-ner-peyma
2021-05-18T20:55:10.000Z
[ "transformers", "pytorch", "tf", "jax", "bert", "token-classification", "fa", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
HooshvareLab
null
null
HooshvareLab/bert-fa-base-uncased-ner-peyma
2
487
transformers
2022-03-02T23:29:04
--- language: fa license: apache-2.0 --- # ParsBERT (v2.0) A Transformer-based Model for Persian Language Understanding We reconstructed the vocabulary and fine-tuned the ParsBERT v1.1 on the new Persian corpora in order to provide some functionalities for using ParsBERT in other scopes! Please follow the [ParsBERT](https://github.com/hooshvare/parsbert) repo for the latest information about previous and current models. ## Persian NER [ARMAN, PEYMA] This task aims to extract named entities in the text, such as names and label with appropriate `NER` classes such as locations, organizations, etc. The datasets used for this task contain sentences that are marked with `IOB` format. In this format, tokens that are not part of an entity are tagged as `”O”` the `”B”`tag corresponds to the first word of an object, and the `”I”` tag corresponds to the rest of the terms of the same entity. Both `”B”` and `”I”` tags are followed by a hyphen (or underscore), followed by the entity category. Therefore, the NER task is a multi-class token classification problem that labels the tokens upon being fed a raw text. There are two primary datasets used in Persian NER, `ARMAN`, and `PEYMA`. ### PEYMA PEYMA dataset includes 7,145 sentences with a total of 302,530 tokens from which 41,148 tokens are tagged with seven different classes. 1. Organization 2. Money 3. Location 4. Date 5. Time 6. Person 7. Percent | Label | # | |:------------:|:-----:| | Organization | 16964 | | Money | 2037 | | Location | 8782 | | Date | 4259 | | Time | 732 | | Person | 7675 | | Percent | 699 | **Download** You can download the dataset from [here](http://nsurl.org/tasks/task-7-named-entity-recognition-ner-for-farsi/) ## Results The following table summarizes the F1 score obtained by ParsBERT as compared to other models and architectures. | Dataset | ParsBERT v2 | ParsBERT v1 | mBERT | MorphoBERT | Beheshti-NER | LSTM-CRF | Rule-Based CRF | BiLSTM-CRF | |---------|-------------|-------------|-------|------------|--------------|----------|----------------|------------| | PEYMA | 93.40* | 93.10 | 86.64 | - | 90.59 | - | 84.00 | - | ## How to use :hugs: | Notebook | Description | | |:----------|:-------------|------:| | [How to use Pipelines](https://github.com/hooshvare/parsbert-ner/blob/master/persian-ner-pipeline.ipynb) | Simple and efficient way to use State-of-the-Art models on downstream tasks through transformers | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hooshvare/parsbert-ner/blob/master/persian-ner-pipeline.ipynb) | ### BibTeX entry and citation info Please cite in publications as the following: ```bibtex @article{ParsBERT, title={ParsBERT: Transformer-based Model for Persian Language Understanding}, author={Mehrdad Farahani, Mohammad Gharachorloo, Marzieh Farahani, Mohammad Manthouri}, journal={ArXiv}, year={2020}, volume={abs/2005.12515} } ``` ## Questions? Post a Github issue on the [ParsBERT Issues](https://github.com/hooshvare/parsbert/issues) repo.
3,217
[ [ -0.0357666015625, -0.05194091796875, 0.0212554931640625, 0.015869140625, -0.0227813720703125, 0.005382537841796875, -0.0290679931640625, -0.01477813720703125, 0.01226043701171875, 0.040679931640625, -0.0233001708984375, -0.04180908203125, -0.04010009765625, ...
sentence-transformers/roberta-base-nli-stsb-mean-tokens
2022-06-15T20:49:42.000Z
[ "sentence-transformers", "pytorch", "tf", "jax", "roberta", "feature-extraction", "sentence-similarity", "transformers", "arxiv:1908.10084", "license:apache-2.0", "endpoints_compatible", "region:us" ]
sentence-similarity
sentence-transformers
null
null
sentence-transformers/roberta-base-nli-stsb-mean-tokens
0
487
sentence-transformers
2022-03-02T23:29:05
--- pipeline_tag: sentence-similarity license: apache-2.0 tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- **⚠️ This model is deprecated. Please don't use it as it produces sentence embeddings of low quality. You can find recommended sentence embedding models here: [SBERT.net - Pretrained Models](https://www.sbert.net/docs/pretrained_models.html)** # sentence-transformers/roberta-base-nli-stsb-mean-tokens This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/roberta-base-nli-stsb-mean-tokens') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/roberta-base-nli-stsb-mean-tokens') model = AutoModel.from_pretrained('sentence-transformers/roberta-base-nli-stsb-mean-tokens') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, max pooling. sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/roberta-base-nli-stsb-mean-tokens) ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 128, 'do_lower_case': True}) with Transformer model: RobertaModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ```
3,991
[ [ -0.01556396484375, -0.059326171875, 0.0201263427734375, 0.029937744140625, -0.0302734375, -0.031982421875, -0.0253143310546875, -0.007274627685546875, 0.0160675048828125, 0.0286407470703125, -0.041107177734375, -0.035614013671875, -0.055694580078125, 0.00841...
thepowefuldeez/sd21-controlnet-canny
2023-03-08T17:31:44.000Z
[ "diffusers", "license:openrail", "diffusers:ControlNetModel", "region:us" ]
null
thepowefuldeez
null
null
thepowefuldeez/sd21-controlnet-canny
6
487
diffusers
2023-03-08T16:23:58
--- license: openrail --- Converted Canny SD 2.1-base model from https://huggingface.co/thibaud/controlnet-sd21/ to diffusers format. Saved only ControlNet weights Usage: ``` from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, DEISMultistepScheduler import cv2 from PIL import Image import numpy as np pipe = StableDiffusionControlNetPipeline.from_pretrained( "stabilityai/stable-diffusion-2-1-base", safety_checker=None, # revision='fp16', # torch_dtype=torch.float16, controlnet=ControlNetModel.from_pretrained("thepowefuldeez/sd21-controlnet-canny") ).to('cuda') pipe.scheduler = DEISMultistepScheduler.from_config(pipe.scheduler.config) image = np.array(Image.open("10.png")) low_threshold = 100 high_threshold = 200 image = cv2.Canny(image, low_threshold, high_threshold) image = image[:, :, None] image = np.concatenate([image, image, image], axis=2) canny_image = Image.fromarray(image) im = pipe( "beautiful woman", image=canny_image, num_inference_steps=30, negative_prompt="ugly, blurry, bad, deformed, bad anatomy", generator=torch.manual_seed(42) ).images[0] ```
1,138
[ [ -0.007659912109375, -0.00469970703125, 0.0015773773193359375, 0.041229248046875, -0.0333251953125, -0.051788330078125, -0.00010031461715698242, 0.016876220703125, 0.0224761962890625, 0.06622314453125, -0.0313720703125, -0.028045654296875, -0.054779052734375, ...
google/pix2struct-infographics-vqa-large
2023-05-19T10:04:46.000Z
[ "transformers", "pytorch", "pix2struct", "text2text-generation", "visual-question-answering", "en", "fr", "ro", "de", "multilingual", "arxiv:2210.03347", "license:apache-2.0", "autotrain_compatible", "has_space", "region:us" ]
visual-question-answering
google
null
null
google/pix2struct-infographics-vqa-large
1
487
transformers
2023-03-21T10:51:39
--- language: - en - fr - ro - de - multilingual pipeline_tag: visual-question-answering inference: false license: apache-2.0 --- # Model card for Pix2Struct - Finetuned on Infographics-VQA (Visual Question Answering over high-res infographics) - large version ![model_image](https://s3.amazonaws.com/moonup/production/uploads/1678713353867-62441d1d9fdefb55a0b7d12c.png) # Table of Contents 0. [TL;DR](#TL;DR) 1. [Using the model](#using-the-model) 2. [Contribution](#contribution) 3. [Citation](#citation) # TL;DR Pix2Struct is an image encoder - text decoder model that is trained on image-text pairs for various tasks, including image captionning and visual question answering. The full list of available models can be found on the Table 1 of the paper: ![Table 1 - paper](https://s3.amazonaws.com/moonup/production/uploads/1678712985040-62441d1d9fdefb55a0b7d12c.png) The abstract of the model states that: > Visually-situated language is ubiquitous—sources range from textbooks with diagrams to web pages with images and tables, to mobile apps with buttons and forms. Perhaps due to this diversity, previous work has typically relied on domainspecific recipes with limited sharing of the underlying data, model architectures, and objectives. We present Pix2Struct, a pretrained image-to-text model for purely visual language understanding, which can be finetuned on tasks containing visually-situated language. Pix2Struct is pretrained by learning to parse masked screenshots of web pages into simplified HTML. The web, with its richness of visual elements cleanly reflected in the HTML structure, provides a large source of pretraining data well suited to the diversity of downstream tasks. Intuitively, this objective subsumes common pretraining signals such as OCR, language modeling, image captioning. In addition to the novel pretraining strategy, we introduce a variable-resolution input representation and a more flexible integration of language and vision inputs, where language prompts such as questions are rendered directly on top of the input image. For the first time, we show that a single pretrained model can achieve state-of-the-art results in six out of nine tasks across four domains: documents, illustrations, user interfaces, and natural images. # Using the model ## Converting from T5x to huggingface You can use the [`convert_pix2struct_checkpoint_to_pytorch.py`](https://github.com/huggingface/transformers/blob/main/src/transformers/models/pix2struct/convert_pix2struct_checkpoint_to_pytorch.py) script as follows: ```bash python convert_pix2struct_checkpoint_to_pytorch.py --t5x_checkpoint_path PATH_TO_T5X_CHECKPOINTS --pytorch_dump_path PATH_TO_SAVE ``` if you are converting a large model, run: ```bash python convert_pix2struct_checkpoint_to_pytorch.py --t5x_checkpoint_path PATH_TO_T5X_CHECKPOINTS --pytorch_dump_path PATH_TO_SAVE --use-large ``` Once saved, you can push your converted model with the following snippet: ```python from transformers import Pix2StructForConditionalGeneration, Pix2StructProcessor model = Pix2StructForConditionalGeneration.from_pretrained(PATH_TO_SAVE) processor = Pix2StructProcessor.from_pretrained(PATH_TO_SAVE) model.push_to_hub("USERNAME/MODEL_NAME") processor.push_to_hub("USERNAME/MODEL_NAME") ``` ## Running the model The instructions for running this model are totally similar to the instructions stated on [`pix2struct-aid-base`](https://huggingface.co/ybelkada/pix2struct-ai2d-base) model. # Contribution This model was originally contributed by Kenton Lee, Mandar Joshi et al. and added to the Hugging Face ecosystem by [Younes Belkada](https://huggingface.co/ybelkada). # Citation If you want to cite this work, please consider citing the original paper: ``` @misc{https://doi.org/10.48550/arxiv.2210.03347, doi = {10.48550/ARXIV.2210.03347}, url = {https://arxiv.org/abs/2210.03347}, author = {Lee, Kenton and Joshi, Mandar and Turc, Iulia and Hu, Hexiang and Liu, Fangyu and Eisenschlos, Julian and Khandelwal, Urvashi and Shaw, Peter and Chang, Ming-Wei and Toutanova, Kristina}, keywords = {Computation and Language (cs.CL), Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
4,503
[ [ -0.0309906005859375, -0.056640625, 0.0295257568359375, 0.021270751953125, -0.0187225341796875, -0.0276641845703125, -0.004425048828125, -0.034088134765625, -0.01214599609375, 0.0302886962890625, -0.046142578125, -0.0175323486328125, -0.052001953125, -0.01055...
stablediffusionapi/product-design
2023-08-29T16:31:28.000Z
[ "diffusers", "stablediffusionapi.com", "stable-diffusion-api", "text-to-image", "ultra-realistic", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
stablediffusionapi
null
null
stablediffusionapi/product-design
8
487
diffusers
2023-06-02T04:03:19
--- license: creativeml-openrail-m tags: - stablediffusionapi.com - stable-diffusion-api - text-to-image - ultra-realistic pinned: true --- # Product Design API Inference ![generated from stablediffusionapi.com](https://cdn2.stablediffusionapi.com/generations/90e4a53c-d07a-4233-9853-d29db7be0603_out.png) ## Get API Key Get API key from [Stable Diffusion API](http://stablediffusionapi.com/), No Payment needed. Replace Key in below code, change **model_id** to "product-design" Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://stablediffusionapi.com/docs) Try model for free: [Generate Images](https://stablediffusionapi.com/models/product-design) Model link: [View model](https://stablediffusionapi.com/models/product-design) Credits: [View credits](https://civitai.com/?query=Product%20Design) View all models: [View Models](https://stablediffusionapi.com/models) import requests import json url = "https://stablediffusionapi.com/api/v3/dreambooth" payload = json.dumps({ "key": "your_api_key", "model_id": "product-design", "prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K", "negative_prompt": "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime", "width": "512", "height": "512", "samples": "1", "num_inference_steps": "30", "safety_checker": "no", "enhance_prompt": "yes", "seed": None, "guidance_scale": 7.5, "multi_lingual": "no", "panorama": "no", "self_attention": "no", "upscale": "no", "embeddings": "embeddings_model_id", "lora": "lora_model_id", "webhook": None, "track_id": None }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) > Use this coupon code to get 25% off **DMGG0RBN**
2,482
[ [ -0.0347900390625, -0.0634765625, 0.0274810791015625, 0.033203125, -0.03741455078125, 0.0101470947265625, 0.023162841796875, -0.040771484375, 0.03863525390625, 0.04095458984375, -0.06451416015625, -0.06585693359375, -0.0208587646484375, -0.00531005859375, ...
pysentimiento/robertuito-irony
2023-02-20T19:05:39.000Z
[ "pysentimiento", "pytorch", "roberta", "twitter", "irony", "es", "arxiv:2106.09462", "region:us" ]
null
pysentimiento
null
null
pysentimiento/robertuito-irony
2
485
pysentimiento
2022-03-02T23:29:05
--- language: - es library_name: pysentimiento tags: - twitter - irony --- # Irony detection in Spanish ## robertuito-irony Repository: [https://github.com/pysentimiento/pysentimiento/](https://github.com/finiteautomata/pysentimiento/) Model trained with IRosVA 2019 dataset for irony detection. Base model is [RoBERTuito](https://github.com/pysentimiento/robertuito), a RoBERTa model trained in Spanish tweets. The positive class marks irony, the negative class marks not irony. ## Results Results for the four tasks evaluated in `pysentimiento`. Results are expressed as Macro F1 scores | model | emotion | hate_speech | irony | sentiment | |:--------------|:--------------|:--------------|:--------------|:--------------| | robertuito | 0.560 ± 0.010 | 0.759 ± 0.007 | 0.739 ± 0.005 | 0.705 ± 0.003 | | roberta | 0.527 ± 0.015 | 0.741 ± 0.012 | 0.721 ± 0.008 | 0.670 ± 0.006 | | bertin | 0.524 ± 0.007 | 0.738 ± 0.007 | 0.713 ± 0.012 | 0.666 ± 0.005 | | beto_uncased | 0.532 ± 0.012 | 0.727 ± 0.016 | 0.701 ± 0.007 | 0.651 ± 0.006 | | beto_cased | 0.516 ± 0.012 | 0.724 ± 0.012 | 0.705 ± 0.009 | 0.662 ± 0.005 | | mbert_uncased | 0.493 ± 0.010 | 0.718 ± 0.011 | 0.681 ± 0.010 | 0.617 ± 0.003 | | biGRU | 0.264 ± 0.007 | 0.592 ± 0.018 | 0.631 ± 0.011 | 0.585 ± 0.011 | Note that for Hate Speech, these are the results for Semeval 2019, Task 5 Subtask B (HS+TR+AG detection) ## Citation If you use this model in your research, please cite pysentimiento and RoBERTuito papers: ``` @misc{perez2021pysentimiento, title={pysentimiento: A Python Toolkit for Sentiment Analysis and SocialNLP tasks}, author={Juan Manuel Pérez and Juan Carlos Giudici and Franco Luque}, year={2021}, eprint={2106.09462}, archivePrefix={arXiv}, primaryClass={cs.CL} } @inproceedings{perez-etal-2022-robertuito, title = "{R}o{BERT}uito: a pre-trained language model for social media text in {S}panish", author = "P{\'e}rez, Juan Manuel and Furman, Dami{\'a}n Ariel and Alonso Alemany, Laura and Luque, Franco M.", booktitle = "Proceedings of the Thirteenth Language Resources and Evaluation Conference", month = jun, year = "2022", address = "Marseille, France", publisher = "European Language Resources Association", url = "https://aclanthology.org/2022.lrec-1.785", pages = "7235--7243", abstract = "Since BERT appeared, Transformer language models and transfer learning have become state-of-the-art for natural language processing tasks. Recently, some works geared towards pre-training specially-crafted models for particular domains, such as scientific papers, medical documents, user-generated texts, among others. These domain-specific models have been shown to improve performance significantly in most tasks; however, for languages other than English, such models are not widely available. In this work, we present RoBERTuito, a pre-trained language model for user-generated text in Spanish, trained on over 500 million tweets. Experiments on a benchmark of tasks involving user-generated text showed that RoBERTuito outperformed other pre-trained language models in Spanish. In addition to this, our model has some cross-lingual abilities, achieving top results for English-Spanish tasks of the Linguistic Code-Switching Evaluation benchmark (LinCE) and also competitive performance against monolingual models in English Twitter tasks. To facilitate further research, we make RoBERTuito publicly available at the HuggingFace model hub together with the dataset used to pre-train it.", } @inproceedings{ortega2019overview, title={Overview of the task on irony detection in Spanish variants}, author={Ortega-Bueno, Reynier and Rangel, Francisco and Hern{\'a}ndez Far{\i}as, D and Rosso, Paolo and Montes-y-G{\'o}mez, Manuel and Medina Pagola, Jos{\'e} E}, booktitle={Proceedings of the Iberian languages evaluation forum (IberLEF 2019), co-located with 34th conference of the Spanish Society for natural language processing (SEPLN 2019). CEUR-WS. org}, volume={2421}, pages={229--256}, year={2019} } ```
4,176
[ [ -0.018310546875, -0.047454833984375, 0.0225372314453125, 0.036529541015625, -0.02349853515625, 0.00791168212890625, -0.036376953125, -0.04571533203125, 0.032562255859375, 0.0246734619140625, -0.042724609375, -0.059600830078125, -0.07171630859375, 0.018875122...
gagan3012/k2t
2021-09-22T08:27:36.000Z
[ "transformers", "pytorch", "t5", "text2text-generation", "keytotext", "k2t", "Keywords to Sentences", "en", "dataset:WebNLG", "dataset:Dart", "license:mit", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
gagan3012
null
null
gagan3012/k2t
1
484
transformers
2022-03-02T23:29:05
--- language: en thumbnail: Keywords to Sentences tags: - keytotext - k2t - Keywords to Sentences license: mit datasets: - WebNLG - Dart metrics: - NLG --- # keytotext ![keytotext (1)](https://user-images.githubusercontent.com/49101362/116334480-f5e57a00-a7dd-11eb-987c-186477f94b6e.png) Idea is to build a model which will take keywords as inputs and generate sentences as outputs. ### Keytotext is powered by Huggingface 🤗 [![pypi Version](https://img.shields.io/pypi/v/keytotext.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/keytotext/) [![Downloads](https://static.pepy.tech/personalized-badge/keytotext?period=total&units=none&left_color=grey&right_color=orange&left_text=Pip%20Downloads)](https://pepy.tech/project/keytotext) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/Examples/K2T.ipynb) [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) ## Model: Keytotext is based on the Amazing T5 Model: - `k2t`: [Model](https://huggingface.co/gagan3012/k2t) - `k2t-tiny`: [Model](https://huggingface.co/gagan3012/k2t-tiny) - `k2t-base`: [Model](https://huggingface.co/gagan3012/k2t-base) Training Notebooks can be found in the [`Training Notebooks`](https://github.com/gagan3012/keytotext/tree/master/Training%20Notebooks) Folder ## Usage: Example usage: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/Examples/K2T.ipynb) Example Notebooks can be found in the [`Notebooks`](https://github.com/gagan3012/keytotext/tree/master/Examples) Folder ``` pip install keytotext ``` ![carbon (3)](https://user-images.githubusercontent.com/49101362/116220679-90e64180-a755-11eb-9246-82d93d924a6c.png) ## UI: UI: [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) ``` pip install streamlit-tags ``` This uses a custom streamlit component built by me: [GitHub](https://github.com/gagan3012/streamlit-tags) ![image](https://user-images.githubusercontent.com/49101362/116162205-fc042980-a6fd-11eb-892e-8f6902f193f4.png)
2,351
[ [ -0.0059051513671875, -0.0262298583984375, 0.04425048828125, 0.02008056640625, -0.0280609130859375, 0.01357269287109375, -0.006191253662109375, -0.014892578125, 0.0172576904296875, 0.0046539306640625, -0.041229248046875, -0.048004150390625, -0.03802490234375, ...
yjernite/bart_eli5
2021-03-09T22:31:11.000Z
[ "transformers", "pytorch", "bart", "text2text-generation", "en", "dataset:eli5", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text2text-generation
yjernite
null
null
yjernite/bart_eli5
10
484
transformers
2022-03-02T23:29:05
--- language: en license: apache-2.0 datasets: - eli5 --- ## BART ELI5 Read the article at https://yjernite.github.io/lfqa.html and try the demo at https://huggingface.co/qa/
177
[ [ -0.056976318359375, -0.05126953125, 0.043670654296875, 0.047821044921875, -0.022369384765625, 0.0186309814453125, 0.0171051025390625, -0.044219970703125, 0.0489501953125, 0.0190582275390625, -0.0657958984375, -0.0357666015625, -0.0089111328125, -0.0004420280...
nvidia/nemo-megatron-gpt-1.3B
2023-01-02T19:10:07.000Z
[ "nemo", "text2text-generation", "pytorch", "causal-lm", "en", "dataset:the_pile", "arxiv:1909.08053", "arxiv:2101.00027", "license:cc-by-4.0", "region:us" ]
text2text-generation
nvidia
null
null
nvidia/nemo-megatron-gpt-1.3B
28
484
nemo
2022-09-10T00:45:45
--- language: - en library_name: nemo datasets: - the_pile tags: - text2text-generation - pytorch - causal-lm license: cc-by-4.0 --- # NeMo Megatron-GPT 1.3B <style> img { display: inline; } </style> |[![Model architecture](https://img.shields.io/badge/Model%20Arch-Transformer%20Decoder-green)](#model-architecture)|[![Model size](https://img.shields.io/badge/Params-1.3B-green)](#model-architecture)|[![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets) ## Model Description Megatron-GPT 1.3B is a transformer-based language model. GPT refers to a class of transformer decoder-only models similar to GPT-2 and 3 while 1.3B refers to the total trainable parameter count (1.3 Billion) [1, 2]. It has Tensor Parallelism (TP) of 1, Pipeline Parallelism (PP) of 1 and should fit on a single NVIDIA GPU. This model was trained with [NeMo Megatron](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/stable/nlp/nemo_megatron/intro.html). ## Getting started ### Step 1: Install NeMo and dependencies You will need to install NVIDIA Apex and NeMo. ``` git clone https://github.com/ericharper/apex.git cd apex git checkout nm_v1.11.0 pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_layer_norm" --global-option="--distributed_adam" --global-option="--deprecated_fused_adam" ./ ``` ``` pip install nemo_toolkit['nlp']==1.11.0 ``` Alternatively, you can use NeMo Megatron training docker container with all dependencies pre-installed. ### Step 2: Launch eval server **Note.** The model has been trained with Tensor Parallelism (TP) of 1 and Pipeline Parallelism (PP) of 1 and should fit on a single NVIDIA GPU. ``` git clone https://github.com/NVIDIA/NeMo.git cd NeMo/examples/nlp/language_modeling git checkout v1.11.0 python megatron_gpt_eval.py gpt_model_file=nemo_gpt1.3B_fp16.nemo server=True tensor_model_parallel_size=1 trainer.devices=1 ``` ### Step 3: Send prompts to your model! ```python import json import requests port_num = 5555 headers = {"Content-Type": "application/json"} def request_data(data): resp = requests.put('http://localhost:{}/generate'.format(port_num), data=json.dumps(data), headers=headers) sentences = resp.json()['sentences'] return sentences data = { "sentences": ["Tell me an interesting fact about space travel."]*1, "tokens_to_generate": 50, "temperature": 1.0, "add_BOS": True, "top_k": 0, "top_p": 0.9, "greedy": False, "all_probs": False, "repetition_penalty": 1.2, "min_tokens_to_generate": 2, } sentences = request_data(data) print(sentences) ``` ## Training Data The model was trained on ["The Piles" dataset prepared by Eleuther.AI](https://pile.eleuther.ai/). [4] ## Evaluation results *Zero-shot performance.* Evaluated using [LM Evaluation Test Suite from AI21](https://github.com/AI21Labs/lm-evaluation) | ARC-Challenge | ARC-Easy | RACE-middle | RACE-high | Winogrande | RTE | BoolQA | HellaSwag | PiQA | | ------------- | -------- | ----------- | --------- | ---------- | --- | ------ | --------- | ---- | | 0.3012 | 0.4596 | 0.459 | 0.3797 | 0.5343 | 0.5451 | 0.5979 | 0.4443 | 0.6834 | ## Limitations The model was trained on the data originally crawled from the Internet. This data contains toxic language and societal biases. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. ## References [1] [Improving Language Understanding by Generative Pre-Training](https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf) [2] [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/pdf/1909.08053.pdf) [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo) [4] [The Pile: An 800GB Dataset of Diverse Text for Language Modeling](https://arxiv.org/abs/2101.00027) ## Licence License to use this model is covered by the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). By downloading the public and release version of the model, you accept the terms and conditions of the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
4,374
[ [ -0.0447998046875, -0.067626953125, 0.0259552001953125, -0.0006418228149414062, -0.0151214599609375, -0.0157623291015625, -0.01207733154296875, -0.022491455078125, 0.01161956787109375, 0.0256195068359375, -0.038116455078125, -0.033660888671875, -0.0604248046875, ...
darkstorm2150/Protogen_Eclipse_Official_Release
2023-01-27T17:44:39.000Z
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "art", "artistic", "en", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
darkstorm2150
null
null
darkstorm2150/Protogen_Eclipse_Official_Release
8
484
diffusers
2023-01-13T07:56:21
--- language: - en tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - art - artistic - diffusers inference: true license: creativeml-openrail-m --- ## Pending info Will add more information soon.. ## Model Weights ![alt text](https://huggingface.co/darkstorm2150/Protogen_Eclipse_Official_Release/resolve/main/Model%20Weights.png)
356
[ [ -0.03021240234375, -0.005924224853515625, 0.0494384765625, 0.044952392578125, -0.004245758056640625, 0.0051727294921875, 0.006717681884765625, -0.0450439453125, 0.037750244140625, 0.0562744140625, -0.016021728515625, -0.037353515625, -0.04656982421875, -0.02...
gokul8967/Joker-lora
2023-10-13T21:28:24.000Z
[ "peft", "region:us" ]
null
gokul8967
null
null
gokul8967/Joker-lora
0
484
peft
2023-10-12T21:28:58
--- library_name: peft --- ## Training procedure The following `bitsandbytes` quantization config was used during training: - load_in_8bit: False - load_in_4bit: True - llm_int8_threshold: 6.0 - llm_int8_skip_modules: None - llm_int8_enable_fp32_cpu_offload: False - llm_int8_has_fp16_weight: False - bnb_4bit_quant_type: nf4 - bnb_4bit_use_double_quant: False - bnb_4bit_compute_dtype: float16 ### Framework versions - PEFT 0.4.0
435
[ [ -0.046600341796875, -0.050079345703125, 0.031585693359375, 0.033233642578125, -0.039031982421875, 0.007396697998046875, 0.01251983642578125, -0.01308441162109375, -0.01149749755859375, 0.0321044921875, -0.0423583984375, -0.00704193115234375, -0.033905029296875, ...
jbilcke-hf/sdxl-starfield
2023-10-27T15:04:16.000Z
[ "diffusers", "stable-diffusion-xl", "stable-diffusion-xl-diffusers", "text-to-image", "lora", "dataset:jbilcke-hf/starfield", "region:us", "has_space" ]
text-to-image
jbilcke-hf
null
null
jbilcke-hf/sdxl-starfield
1
484
diffusers
2023-10-27T09:53:40
--- base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: starfield-style tags: - stable-diffusion-xl - stable-diffusion-xl-diffusers - text-to-image - diffusers - lora inference: true datasets: - jbilcke-hf/starfield --- # LoRA DreamBooth - jbilcke-hf/sdxl-starfield These are LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0 trained on @fffiloni's SD-XL trainer. The weights were trained on the concept prompt: ``` starfield-style ``` Use this keyword to trigger your custom model in your prompts. LoRA for the text encoder was enabled: False. Special VAE used for training: madebyollin/sdxl-vae-fp16-fix. ## Usage Make sure to upgrade diffusers to >= 0.19.0: ``` pip install diffusers --upgrade ``` In addition make sure to install transformers, safetensors, accelerate as well as the invisible watermark: ``` pip install invisible_watermark transformers accelerate safetensors ``` To just use the base model, you can run: ```python import torch from diffusers import DiffusionPipeline, AutoencoderKL device = "cuda" if torch.cuda.is_available() else "cpu" vae = AutoencoderKL.from_pretrained('madebyollin/sdxl-vae-fp16-fix', torch_dtype=torch.float16) pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True ) pipe.to(device) # This is where you load your trained weights specific_safetensors = "pytorch_lora_weights.safetensors" lora_scale = 0.9 pipe.load_lora_weights( 'jbilcke-hf/sdxl-starfield', weight_name = specific_safetensors, # use_auth_token = True ) prompt = "A majestic starfield-style jumping from a big stone at night" image = pipe( prompt=prompt, num_inference_steps=50, cross_attention_kwargs={"scale": lora_scale} ).images[0] ```
1,839
[ [ -0.01532745361328125, -0.0330810546875, 0.028717041015625, 0.0158233642578125, -0.0190887451171875, 0.004543304443359375, 0.0092926025390625, -0.01959228515625, 0.037078857421875, 0.045166015625, -0.0400390625, -0.03369140625, -0.05780029296875, -0.009292602...
KETI-AIR/ke-t5-large-ko
2022-11-02T02:59:44.000Z
[ "transformers", "pytorch", "tf", "jax", "t5", "text2text-generation", "ko", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
KETI-AIR
null
null
KETI-AIR/ke-t5-large-ko
1
483
transformers
2022-03-02T23:29:04
--- license: apache-2.0 language: ko tags: - t5 eos_token: "</s>" widget: - text: 아버지가 방에 들어가신다.</s> --- # ke-t5 base Pretrained T5 Model on Korean and English. See [Github](https://github.com/AIRC-KETI/ke-t5) and [Paper](https://aclanthology.org/2021.findings-emnlp.33/) [Korean paper](https://koreascience.kr/article/CFKO202130060717834.pdf) for more details. ## How to use ```python from transformers import AutoModel, AutoTokenizer model = AutoModel.from_pretrained("KETI-AIR/ke-t5-large-ko") tokenizer = AutoTokenizer.from_pretrained("KETI-AIR/ke-t5-large-ko") ``` ## BibTeX entry and citation info ```bibtex @inproceedings{kim-etal-2021-model-cross, title = "A Model of Cross-Lingual Knowledge-Grounded Response Generation for Open-Domain Dialogue Systems", author = "Kim, San and Jang, Jin Yea and Jung, Minyoung and Shin, Saim", booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021", month = nov, year = "2021", address = "Punta Cana, Dominican Republic", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2021.findings-emnlp.33", doi = "10.18653/v1/2021.findings-emnlp.33", pages = "352--365", abstract = "Research on open-domain dialogue systems that allow free topics is challenging in the field of natural language processing (NLP). The performance of the dialogue system has been improved recently by the method utilizing dialogue-related knowledge; however, non-English dialogue systems suffer from reproducing the performance of English dialogue systems because securing knowledge in the same language with the dialogue system is relatively difficult. Through experiments with a Korean dialogue system, this paper proves that the performance of a non-English dialogue system can be improved by utilizing English knowledge, highlighting the system uses cross-lingual knowledge. For the experiments, we 1) constructed a Korean version of the Wizard of Wikipedia dataset, 2) built Korean-English T5 (KE-T5), a language model pre-trained with Korean and English corpus, and 3) developed a knowledge-grounded Korean dialogue model based on KE-T5. We observed the performance improvement in the open-domain Korean dialogue model even only English knowledge was given. The experimental results showed that the knowledge inherent in cross-lingual language models can be helpful for generating responses in open dialogue systems.", } ```
2,488
[ [ -0.031097412109375, -0.04473876953125, 0.01812744140625, 0.0125885009765625, -0.01125335693359375, 0.008697509765625, -0.0301513671875, -0.03155517578125, 0.01007080078125, 0.018707275390625, -0.03265380859375, -0.04449462890625, -0.0355224609375, 0.01520538...
T-Systems-onsite/mt5-small-sum-de-en-v2
2023-04-27T19:26:23.000Z
[ "transformers", "pytorch", "safetensors", "mt5", "text2text-generation", "summarization", "de", "en", "multilingual", "dataset:cnn_dailymail", "dataset:xsum", "dataset:mlsum", "dataset:swiss_text_2019", "license:cc-by-nc-sa-4.0", "autotrain_compatible", "endpoints_compatible", "text-...
summarization
T-Systems-onsite
null
null
T-Systems-onsite/mt5-small-sum-de-en-v2
5
483
transformers
2022-03-02T23:29:05
--- language: - de - en - multilingual license: cc-by-nc-sa-4.0 tags: - summarization datasets: - cnn_dailymail - xsum - mlsum - swiss_text_2019 --- # mT5-small-sum-de-en-v2 This is a bilingual summarization model for English and German. It is based on the multilingual T5 model [google/mt5-small](https://huggingface.co/google/mt5-small). ## Training The training was conducted with the following hyperparameters: - base model: [google/mt5-small](https://huggingface.co/google/mt5-small) - source_prefix: `"summarize: "` - batch size: 3 - max_source_length: 800 - max_target_length: 96 - warmup_ratio: 0.3 - number of train epochs: 10 - gradient accumulation steps: 2 - learning rate: 5e-5 ## Datasets and Preprocessing The datasets were preprocessed as follows: The summary was tokenized with the [google/mt5-small](https://huggingface.co/google/mt5-small) tokenizer. Then only the records with no more than 94 summary tokens were selected. The MLSUM dataset has a special characteristic. In the text, the summary is often included completely as one or more sentences. These have been removed from the texts. The reason is that we do not want to train a model that ultimately extracts only sentences as a summary. This model is trained on the following datasets: | Name | Language | License |------|----------|-------- | [CNN Daily - Train](https://github.com/abisee/cnn-dailymail) | en | The license is unclear. The data comes from CNN and Daily Mail. We assume that it may only be used for research purposes and not commercially. | [Extreme Summarization (XSum) - Train](https://github.com/EdinburghNLP/XSum) | en | The license is unclear. The data comes from BBC. We assume that it may only be used for research purposes and not commercially. | [MLSUM German - Train](https://github.com/ThomasScialom/MLSUM) | de | Usage of dataset is restricted to non-commercial research purposes only. Copyright belongs to the original copyright holders (see [here](https://github.com/ThomasScialom/MLSUM#mlsum)). | [SwissText 2019 - Train](https://www.swisstext.org/2019/shared-task/german-text-summarization-challenge.html) | de | The license is unclear. The data was published in the [German Text Summarization Challenge](https://www.swisstext.org/2019/shared-task/german-text-summarization-challenge.html). We assume that they may be used for research purposes and not commercially. | Language | Size |------|------ | German | 302,607 | English | 422,228 | Total | 724,835 ## Evaluation on MLSUM German Test Set (no beams) | Model | rouge1 | rouge2 | rougeL | rougeLsum |-------|--------|--------|--------|---------- | [ml6team/mt5-small-german-finetune-mlsum](https://huggingface.co/ml6team/mt5-small-german-finetune-mlsum) | 18.3607 | 5.3604 | 14.5456 | 16.1946 | [deutsche-telekom/mT5-small-sum-de-en-01](https://huggingface.co/deutsche-telekom/mt5-small-sum-de-en-v1) | 21.7336 | 7.2614 | 17.1323 | 19.3977 | **T-Systems-onsite/mt5-small-sum-de-en-v2 (this)** | **21.7756** | **7.2662** | **17.1444** | **19.4242** ## Evaluation on CNN Daily English Test Set (no beams) | Model | rouge1 | rouge2 | rougeL | rougeLsum |-------|--------|--------|--------|---------- | [sshleifer/distilbart-xsum-12-6](https://huggingface.co/sshleifer/distilbart-xsum-12-6) | 26.7664 | 8.8243 | 18.3703 | 23.2614 | [facebook/bart-large-xsum](https://huggingface.co/facebook/bart-large-xsum) | 28.5374 | 9.8565 | 19.4829 | 24.7364 | [mrm8488/t5-base-finetuned-summarize-news](https://huggingface.co/mrm8488/t5-base-finetuned-summarize-news) | 37.576 | 14.7389 | 24.0254 | 34.4634 | [deutsche-telekom/mT5-small-sum-de-en-01](https://huggingface.co/deutsche-telekom/mt5-small-sum-de-en-v1) | 37.6339 | 16.5317 | 27.1418 | 34.9951 | **T-Systems-onsite/mt5-small-sum-de-en-v2 (this)** | **37.8096** | **16.6646** | **27.2239** | **35.1916** ## Evaluation on Extreme Summarization (XSum) English Test Set (no beams) | Model | rouge1 | rouge2 | rougeL | rougeLsum |-------|--------|--------|--------|---------- | [mrm8488/t5-base-finetuned-summarize-news](https://huggingface.co/mrm8488/t5-base-finetuned-summarize-news) | 18.6204 | 3.535 | 12.3997 | 15.2111 | [facebook/bart-large-xsum](https://huggingface.co/facebook/bart-large-xsum) | 28.5374 | 9.8565 | 19.4829 | 24.7364 | [deutsche-telekom/mT5-small-sum-de-en-01](https://huggingface.co/deutsche-telekom/mt5-small-sum-de-en-v1) | 32.3416 | 10.6191 | 25.3799 | 25.3908 | T-Systems-onsite/mt5-small-sum-de-en-v2 (this) | 32.4828 | 10.7004| 25.5238 | 25.5369 | [sshleifer/distilbart-xsum-12-6](https://huggingface.co/sshleifer/distilbart-xsum-12-6) | 44.2553 &clubs; | 21.4289 &clubs; | 36.2639 &clubs; | 36.2696 &clubs; &clubs;: These values seem to be unusually high. It could be that the test set was used in the training data. ## License Copyright (c) 2021 Philip May, T-Systems on site services GmbH This work is licensed under the [Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)](https://creativecommons.org/licenses/by-nc-sa/3.0/) license.
5,016
[ [ -0.042144775390625, -0.029510498046875, 0.0006432533264160156, 0.017181396484375, -0.0273284912109375, -0.003910064697265625, -0.0254058837890625, -0.0305328369140625, 0.049774169921875, 0.00852203369140625, -0.045745849609375, -0.04559326171875, -0.06005859375,...
google/pegasus-pubmed
2023-01-24T16:42:41.000Z
[ "transformers", "pytorch", "pegasus", "text2text-generation", "summarization", "en", "arxiv:1912.08777", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
summarization
google
null
null
google/pegasus-pubmed
6
483
transformers
2022-03-02T23:29:05
--- language: en tags: - summarization --- ### Pegasus Models See Docs: [here](https://huggingface.co/transformers/master/model_doc/pegasus.html) Original TF 1 code [here](https://github.com/google-research/pegasus) Authors: Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu on Dec 18, 2019 Maintained by: [@sshleifer](https://twitter.com/sam_shleifer) Task: Summarization The following is copied from the authors' README. # Mixed & Stochastic Checkpoints We train a pegasus model with sampled gap sentence ratios on both C4 and HugeNews, and stochastically sample important sentences. The updated the results are reported in this table. | dataset | C4 | HugeNews | Mixed & Stochastic| | ---- | ---- | ---- | ----| | xsum | 45.20/22.06/36.99 | 47.21/24.56/39.25 | 47.60/24.83/39.64| | cnn_dailymail | 43.90/21.20/40.76 | 44.17/21.47/41.11 | 44.16/21.56/41.30| | newsroom | 45.07/33.39/41.28 | 45.15/33.51/41.33 | 45.98/34.20/42.18| | multi_news | 46.74/17.95/24.26 | 47.52/18.72/24.91 | 47.65/18.75/24.95| | gigaword | 38.75/19.96/36.14 | 39.12/19.86/36.24 | 39.65/20.47/36.76| | wikihow | 43.07/19.70/34.79 | 41.35/18.51/33.42 | 46.39/22.12/38.41 *| | reddit_tifu | 26.54/8.94/21.64 | 26.63/9.01/21.60 | 27.99/9.81/22.94| | big_patent | 53.63/33.16/42.25 | 53.41/32.89/42.07 | 52.29/33.08/41.66 *| | arxiv | 44.70/17.27/25.80 | 44.67/17.18/25.73 | 44.21/16.95/25.67| | pubmed | 45.49/19.90/27.69 | 45.09/19.56/27.42 | 45.97/20.15/28.25| | aeslc | 37.69/21.85/36.84 | 37.40/21.22/36.45 | 37.68/21.25/36.51| | billsum | 57.20/39.56/45.80 | 57.31/40.19/45.82 | 59.67/41.58/47.59| The "Mixed & Stochastic" model has the following changes: - trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples). - trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity). - the model uniformly sample a gap sentence ratio between 15% and 45%. - importance sentences are sampled using a 20% uniform noise to importance scores. - the sentencepiece tokenizer is updated to be able to encode newline character. (*) the numbers of wikihow and big_patent datasets are not comparable because of change in tokenization and data: - wikihow dataset contains newline characters which is useful for paragraph segmentation, the C4 and HugeNews model's sentencepiece tokenizer doesn't encode newline and loose this information. - we update the BigPatent dataset to preserve casing, some format cleanings are also changed, please refer to change in TFDS. The "Mixed & Stochastic" model has the following changes (from pegasus-large in the paper): trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples). trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity). the model uniformly sample a gap sentence ratio between 15% and 45%. importance sentences are sampled using a 20% uniform noise to importance scores. the sentencepiece tokenizer is updated to be able to encode newline character. Citation ``` @misc{zhang2019pegasus, title={PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization}, author={Jingqing Zhang and Yao Zhao and Mohammad Saleh and Peter J. Liu}, year={2019}, eprint={1912.08777}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
3,332
[ [ -0.0284423828125, -0.05816650390625, 0.0289306640625, 0.020721435546875, -0.0264892578125, -0.0250701904296875, -0.0107269287109375, -0.033721923828125, 0.0394287109375, 0.0221405029296875, -0.058349609375, -0.045867919921875, -0.05474853515625, -0.001386642...
malteos/bloom-6b4-clp-german
2023-07-12T08:48:04.000Z
[ "transformers", "pytorch", "bloom", "ggml", "text-generation", "de", "dataset:oscar", "arxiv:2301.09626", "license:bigscience-bloom-rail-1.0", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
malteos
null
null
malteos/bloom-6b4-clp-german
31
483
transformers
2022-11-07T15:33:45
--- language: - de license: bigscience-bloom-rail-1.0 library_name: transformers tags: - ggml - bloom datasets: - oscar pipeline_tag: text-generation --- # BLOOM-CLP German (6.4B parameters) This is a monolingual German language model trained using the [CLP-Transfer](https://arxiv.org/abs/2301.09626) method based on [BLOOM-7b1](https://huggingface.co/bigscience/bloom-7b1). You can try out the model at [European Language Grid](https://live.european-language-grid.eu/catalogue/tool-service/20825/try%20out/). <span style="color:blue">UPDATE: We recently released an instruction-tuned version of this model: [malteos/bloom-6b4-clp-german-oasst-v0.1](https://huggingface.co/malteos/bloom-6b4-clp-german-oasst-v0.1)</span>. ### How to use You can use this model 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='malteos/bloom-6b4-clp-german') >>> set_seed(42) >>> generator("Hello, I'm a language model,", max_length=30, num_return_sequences=3) [{'generated_text': "Hello, I'm a language model, a language for thinking, a language for expressing thoughts."}, {'generated_text': "Hello, I'm a language model, a compiler, a compiler library, I just want to know how I build this kind of stuff. I don"}, {'generated_text': "Hello, I'm a language model, and also have more than a few of your own, but I understand that they're going to need some help"},] ``` ## Training dataset - ca. 50B German tokens - Web-crawled content from the German subset [OSCAR v22.01](https://oscar-corpus.com/post/oscar-v22-01/) (excluding content tagged as header, footer, noisy, or adult) - Web-crawled content from the [GC4 Corpus](https://german-nlp-group.github.io/projects/gc4-corpus.html) (including only the head and middle parts) - Both Web-crawled datasets are deduplicated with [Google's suffix array implementation](https://github.com/google-research/deduplicate-text-datasets) - German court decisions from [Open Legal Data](http://openlegaldata.io/) ## Code - [BigScience's Megatron-Deepspeed fork](https://github.com/bigscience-workshop/Megatron-DeepSpeed) ## Hardware - 32xA100-40GB GPUs - 12.5 days - [Tensorboard logs](https://huggingface.co/malteos/bloom-6b4-clp-german-logs/tensorboard) ## Evaluation Validation PPL compared to from-scratch training (the lower the better): <img alt="Tokens vs PPL" src="https://github.com/malteos/clp-transfer/raw/main/german-6b-ppl.png"> Additional evaluations can be found in [our paper](https://arxiv.org/abs/2301.09626). ## How to cite If you are using our code or models, please cite [our paper](https://arxiv.org/abs/2301.09626): ```bibtex @misc{Ostendorff2023clp, doi = {10.48550/ARXIV.2301.09626}, author = {Ostendorff, Malte and Rehm, Georg}, title = {Efficient Language Model Training through Cross-Lingual and Progressive Transfer Learning}, publisher = {arXiv}, year = {2023} } ``` ## License [BigScience BLOOM RAIL 1.0](https://bigscience.huggingface.co/blog/the-bigscience-rail-license)
3,154
[ [ -0.036956787109375, -0.050201416015625, 0.029937744140625, 0.0216827392578125, -0.0105438232421875, -0.006122589111328125, -0.033111572265625, -0.040252685546875, 0.0026683807373046875, 0.01392364501953125, -0.044921875, -0.052581787109375, -0.042633056640625, ...
Neko-Institute-of-Science/LLaMA-65B-HF
2023-04-15T16:31:11.000Z
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "license:other", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
Neko-Institute-of-Science
null
null
Neko-Institute-of-Science/LLaMA-65B-HF
6
483
transformers
2023-04-06T01:23:00
--- license: other --- LLaMA converted to Transformers. This is under a special license, please see the LICENSE file for details. # LLaMA Model Card https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md # Torrent 7-65B Note: the torrent has outdated tokenizer_config.json and special_tokens_map.json. Replace them with the ones here. For those who want to save HF's bandwith here's a magnet link: **magnet:?xt=urn:btih:8d634925911a03f787d9f68ac075a9b24281573a&dn=Safe-LLaMA-HF-v2%20(4-04-23)&tr=http%3a%2f%2fbt2.archive.org%3a6969%2fannounce&tr=http%3a%2f%2fbt1.archive.org%3a6969%2fannounce**
608
[ [ -0.0303497314453125, -0.037200927734375, 0.0204315185546875, 0.035919189453125, -0.053924560546875, 0.0234222412109375, 0.00872802734375, -0.0177154541015625, 0.058929443359375, 0.041015625, -0.06158447265625, -0.0236358642578125, -0.0477294921875, 0.0232543...
chayanbhansali/clock-tower
2023-07-17T11:07:56.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
chayanbhansali
null
null
chayanbhansali/clock-tower
0
483
diffusers
2023-07-17T11:03:06
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### clock_tower Dreambooth model trained by chayanbhansali with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
507
[ [ -0.01641845703125, -0.0692138671875, 0.0277557373046875, 0.033660888671875, -0.0245819091796875, 0.0240325927734375, 0.0292205810546875, -0.037628173828125, 0.031768798828125, -0.00241851806640625, -0.014190673828125, -0.006591796875, -0.031829833984375, -0....
NaveedRajput/floorplan200-200
2023-07-20T18:13:39.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
NaveedRajput
null
null
NaveedRajput/floorplan200-200
0
483
diffusers
2023-07-20T18:09:37
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### Floorplan200/200 Dreambooth model trained by NaveedRajput with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
510
[ [ -0.0296630859375, -0.048858642578125, 0.041259765625, 0.041900634765625, -0.0121917724609375, 0.0223388671875, 0.02880859375, -0.0126190185546875, 0.037872314453125, 0.0158843994140625, -0.021087646484375, -0.0221710205078125, -0.0206451416015625, -0.0129928...
Trelis/Llama-2-7b-chat-hf-sharded-bf16-5GB
2023-07-31T21:43:48.000Z
[ "transformers", "pytorch", "llama", "text-generation", "facebook", "meta", "llama-2", "sharded", "en", "arxiv:2307.09288", "text-generation-inference", "region:us" ]
text-generation
Trelis
null
null
Trelis/Llama-2-7b-chat-hf-sharded-bf16-5GB
2
483
transformers
2023-07-24T10:00:22
--- language: - en pipeline_tag: text-generation inference: false arxiv: 2307.09288 tags: - facebook - meta - pytorch - llama - llama-2 - sharded --- # **llama-2-chat-7b-hf (sharded)** This is a sharded version of Meta's Llama 2 chat 7b model, specifically the hugging face version. Shards are 5 GB max in size - intended to be loadable into free Google Colab notebooks. All details below are copied from the original repo. Colab notebook for sharding: https://colab.research.google.com/drive/1f1q9qc56wzB_7-bjgNyLlO6f28ui1esQ Colab notebook for inference (just change the model id): https://colab.research.google.com/drive/1zxwaTSvd6PSHbtyaoa7tfedAS31j_N6m ## Inference with Google Colab and HuggingFace 🤗 Get started by saving your own copy of this [fLlama_Inference notebook](https://colab.research.google.com/drive/1Ow5cQ0JNv-vXsT-apCceH6Na3b4L7JyW?usp=sharing). You will be able to run inference using a free Colab notebook if you select a gpu runtime. See the notebook for more details. ~ # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B fine-tuned model, optimized for dialogue use cases and converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 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 to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **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://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** 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 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with 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 2’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 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/llamaste/Llama-2-7b) | [Link](https://huggingface.co/llamaste/Llama-2-7b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/llamaste/Llama-2-13b) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-13b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf)| |70B| [Link](https://huggingface.co/llamaste/Llama-2-70b) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-70b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf)|
10,489
[ [ -0.0176849365234375, -0.0625, 0.027191162109375, 0.015655517578125, -0.0234527587890625, 0.0156402587890625, -0.004558563232421875, -0.054962158203125, 0.0122833251953125, 0.0242767333984375, -0.05218505859375, -0.039215087890625, -0.048614501953125, 0.00423...
hosnasn/Reza_DB200
2023-09-20T12:45:31.000Z
[ "diffusers", "text-to-image", "autotrain", "has_space", "region:us" ]
text-to-image
hosnasn
null
null
hosnasn/Reza_DB200
0
483
diffusers
2023-09-20T12:45:30
--- base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: photo of Reza tags: - text-to-image - diffusers - autotrain inference: true --- # DreamBooth trained by AutoTrain Text encoder was not trained.
226
[ [ 0.004848480224609375, -0.011810302734375, 0.0156097412109375, 0.0089569091796875, -0.036346435546875, 0.06683349609375, 0.01294708251953125, -0.013519287109375, 0.035552978515625, -0.00022685527801513672, -0.03582763671875, -0.002941131591796875, -0.059753417968...
sshleifer/distilbart-xsum-12-1
2021-06-14T07:56:06.000Z
[ "transformers", "pytorch", "jax", "bart", "text2text-generation", "summarization", "en", "dataset:cnn_dailymail", "dataset:xsum", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
summarization
sshleifer
null
null
sshleifer/distilbart-xsum-12-1
3
482
transformers
2022-03-02T23:29:05
--- language: en tags: - summarization license: apache-2.0 datasets: - cnn_dailymail - xsum thumbnail: https://huggingface.co/front/thumbnails/distilbart_medium.png --- ### Usage This checkpoint should be loaded into `BartForConditionalGeneration.from_pretrained`. See the [BART docs](https://huggingface.co/transformers/model_doc/bart.html?#transformers.BartForConditionalGeneration) for more information. ### Metrics for DistilBART models | Model Name | MM Params | Inference Time (MS) | Speedup | Rouge 2 | Rouge-L | |:---------------------------|------------:|----------------------:|----------:|----------:|----------:| | distilbart-xsum-12-1 | 222 | 90 | 2.54 | 18.31 | 33.37 | | distilbart-xsum-6-6 | 230 | 132 | 1.73 | 20.92 | 35.73 | | distilbart-xsum-12-3 | 255 | 106 | 2.16 | 21.37 | 36.39 | | distilbart-xsum-9-6 | 268 | 136 | 1.68 | 21.72 | 36.61 | | bart-large-xsum (baseline) | 406 | 229 | 1 | 21.85 | 36.50 | | distilbart-xsum-12-6 | 306 | 137 | 1.68 | 22.12 | 36.99 | | bart-large-cnn (baseline) | 406 | 381 | 1 | 21.06 | 30.63 | | distilbart-12-3-cnn | 255 | 214 | 1.78 | 20.57 | 30.00 | | distilbart-12-6-cnn | 306 | 307 | 1.24 | 21.26 | 30.59 | | distilbart-6-6-cnn | 230 | 182 | 2.09 | 20.17 | 29.70 |
1,705
[ [ -0.04412841796875, -0.023468017578125, 0.0386962890625, 0.026702880859375, -0.0132598876953125, 0.015167236328125, 0.01352691650390625, -0.0012273788452148438, 0.0157012939453125, 0.028900146484375, -0.06292724609375, -0.039337158203125, -0.0546875, -0.01164...
akoksal/bounti
2022-04-11T20:12:25.000Z
[ "transformers", "pytorch", "bert", "text-classification", "sentiment", "twitter", "turkish", "tr", "endpoints_compatible", "region:us" ]
text-classification
akoksal
null
null
akoksal/bounti
2
482
transformers
2022-04-11T19:55:36
--- language: "tr" tags: - sentiment - twitter - turkish --- This Turkish Sentiment Analysis model is a fine-tuned checkpoint of pretrained [BERTurk model 128k uncased](https://huggingface.co/dbmdz/bert-base-turkish-128k-uncased) with [BounTi dataset](https://ieeexplore.ieee.org/document/9477814). ## Usage in Hugging Face Pipeline ``` from transformers import pipeline bounti = pipeline("sentiment-analysis",model="akoksal/bounti") print(bounti("Bu yemeği pek sevmedim")) >> [{'label': 'negative', 'score': 0.8012508153915405}] ``` ## Results The scores of the finetuned model with BERTurk: ||Accuracy|Precision|Recall|F1| |-------------|:---------:|:---------:|:------:|:-----:| |Validation|0.745|0.706|0.730|0.715| |Test|0.723|0.692|0.729|0.701| ## Dataset You can find the dataset in [our Github repo](https://github.com/boun-tabi/BounTi-Turkish-Sentiment-Analysis) with the training, validation, and test splits. Due to Twitter copyright, we cannot release the full text of the tweets. We share the tweet IDs, and the full text can be downloaded through official Twitter API. | | Training | Validation | Test | |----------|:--------:|:----------:|:----:| | Positive | 1691 | 188 | 469 | | Neutral | 3034 | 338 | 843 | | Negative | 1008 | 113 | 280 | | Total | 5733 | 639 | 1592 | ## Citation You can cite the following paper if you use our work: ``` @INPROCEEDINGS{BounTi, author={Köksal, Abdullatif and Özgür, Arzucan}, booktitle={2021 29th Signal Processing and Communications Applications Conference (SIU)}, title={Twitter Dataset and Evaluation of Transformers for Turkish Sentiment Analysis}, year={2021}, volume={}, number={} } ``` ---
1,733
[ [ -0.0447998046875, -0.045623779296875, 0.001190185546875, 0.022064208984375, -0.041778564453125, 0.00316619873046875, -0.0126800537109375, -0.01334381103515625, 0.0173492431640625, 0.0260772705078125, -0.06658935546875, -0.0609130859375, -0.052825927734375, -...
RamAnanth1/distilgpt2-sd-prompts
2023-03-19T19:55:02.000Z
[ "transformers", "pytorch", "safetensors", "gpt2", "text-generation", "generated_from_trainer", "dataset:Gustavosta/Stable-Diffusion-Prompts", "license:apache-2.0", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
RamAnanth1
null
null
RamAnanth1/distilgpt2-sd-prompts
4
482
transformers
2022-10-20T03:51:27
--- license: apache-2.0 tags: - generated_from_trainer datasets: Gustavosta/Stable-Diffusion-Prompts widget: - text: A detective of wolfhound model-index: - name: distilgpt2-sd-prompts 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. --> # distilgpt2-sd-prompts This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on [Stable-Diffusion-Prompts](https://huggingface.co/datasets/Gustavosta/Stable-Diffusion-Prompts). It achieves the following results on the evaluation set: - Loss: 0.9450 ## 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: 0.0005 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - gradient_accumulation_steps: 8 - total_train_batch_size: 256 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - lr_scheduler_warmup_steps: 500 - num_epochs: 8 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:----:|:---------------:| | 2.5122 | 1.93 | 500 | 1.5211 | | 1.2912 | 3.86 | 1000 | 1.1045 | | 0.9313 | 5.79 | 1500 | 0.9704 | | 0.7744 | 7.72 | 2000 | 0.9450 | ### Framework versions - Transformers 4.23.1 - Pytorch 1.12.1+cu113 - Datasets 2.6.1 - Tokenizers 0.13.1
1,703
[ [ -0.038421630859375, -0.049224853515625, 0.02435302734375, 0.019989013671875, -0.0265960693359375, -0.02374267578125, -0.005207061767578125, 0.002689361572265625, -0.004810333251953125, 0.006999969482421875, -0.054595947265625, -0.037017822265625, -0.063842773437...
jpthehistorian/jpthehistorian
2022-12-04T03:54:39.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
jpthehistorian
null
null
jpthehistorian/jpthehistorian
0
482
diffusers
2022-12-04T03:49:52
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### jpthehistorian Dreambooth model trained by jpthehistorian with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Or you can run your new concept via `diffusers` [Colab Notebook for Inference](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_dreambooth_inference.ipynb) Sample pictures of this concept: ![0](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(2).png) ![1](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(4).png) ![2](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(13).png) ![3](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(11).png) ![4](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(8).png) ![5](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(9).png) ![6](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(7).png) ![7](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(10).png) ![8](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(1).png) ![9](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(12).png) ![10](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(3).png) ![11](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(6).png) ![12](https://huggingface.co/jpthehistorian/jpthehistorian/resolve/main/sample_images/1_(5).png)
2,023
[ [ -0.054534912109375, -0.048736572265625, 0.03558349609375, 0.024749755859375, -0.032470703125, 0.007381439208984375, 0.0066680908203125, -0.035675048828125, 0.0628662109375, 0.01415252685546875, -0.037322998046875, -0.03277587890625, -0.042205810546875, -0.00...
WALIDALI/bekinorrev
2023-07-10T21:00:29.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
WALIDALI
null
null
WALIDALI/bekinorrev
0
482
diffusers
2023-07-10T20:57:08
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### bekinorrev Dreambooth model trained by WALIDALI with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
500
[ [ -0.0199432373046875, -0.05609130859375, 0.03076171875, 0.027130126953125, -0.024566650390625, 0.0279388427734375, 0.017181396484375, -0.0201873779296875, 0.05078125, 0.006801605224609375, -0.0240020751953125, -0.01708984375, -0.04534912109375, -0.01791381835...
jakedahn/sdxl-isometric-geology
2023-10-12T17:12:43.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "lora", "license:creativeml-openrail-m", "region:us", "has_space" ]
text-to-image
jakedahn
null
null
jakedahn/sdxl-isometric-geology
3
482
diffusers
2023-10-12T17:12:16
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion - lora - diffusers base_model: stabilityai/stable-diffusion-xl-base-1.0 pivotal_tuning: true textual_embeddings: embeddings.pti instance_prompt: <s0><s1> inference: false --- # sdxl-isometric-geology LoRA by [jakedahn](https://replicate.com/jakedahn) ### sdxl-isometric-geology is an SDXL fine-tune that's been trained with cool USGS isometric block and fence diagrams from the 1950s and 1960s. ![lora_image](https://replicate.delivery/pbxt/CoMBej9GOtyNKqyDHb0fsNSdABpTzOszpjltZGvHsbqif8XjA/out-0.png) > ## Inference with Replicate API Grab your replicate token [here](https://replicate.com/account) ```bash pip install replicate export REPLICATE_API_TOKEN=r8_************************************* ``` ```py import replicate output = replicate.run( "sdxl-isometric-geology@sha256:44272e4bb4f61d052617d4b56cc5be7b34dc27d9605e4c9568efc215aae547c5", input={"prompt": "a diagram of gradient descent, in the style of TOK"} ) print(output) ``` You may also do inference via the API with Node.js or curl, and locally with COG and Docker, [check out the Replicate API page for this model](https://replicate.com/jakedahn/sdxl-isometric-geology/api) ## Inference with 🧨 diffusers Replicate SDXL LoRAs are trained with Pivotal Tuning, which combines training a concept via Dreambooth LoRA with training a new token with Textual Inversion. As `diffusers` doesn't yet support textual inversion for SDXL, we will use cog-sdxl `TokenEmbeddingsHandler` class. The trigger tokens for your prompt will be `<s0><s1>` ```shell pip install diffusers transformers accelerate safetensors huggingface_hub git clone https://github.com/replicate/cog-sdxl cog_sdxl ``` ```py import torch from huggingface_hub import hf_hub_download from diffusers import DiffusionPipeline from cog_sdxl.dataset_and_utils import TokenEmbeddingsHandler from diffusers.models import AutoencoderKL pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", ).to("cuda") pipe.load_lora_weights("jakedahn/sdxl-isometric-geology", weight_name="lora.safetensors") text_encoders = [pipe.text_encoder, pipe.text_encoder_2] tokenizers = [pipe.tokenizer, pipe.tokenizer_2] embedding_path = hf_hub_download(repo_id="jakedahn/sdxl-isometric-geology", filename="embeddings.pti", repo_type="model") embhandler = TokenEmbeddingsHandler(text_encoders, tokenizers) embhandler.load_embeddings(embedding_path) prompt="a diagram of gradient descent, in the style of <s0><s1>" images = pipe( prompt, cross_attention_kwargs={"scale": 0.8}, ).images #your output image images[0] ```
2,720
[ [ -0.0236968994140625, -0.045440673828125, 0.048736572265625, 0.021697998046875, -0.03155517578125, -0.01433563232421875, 0.0017452239990234375, -0.0033397674560546875, 0.04046630859375, 0.04266357421875, -0.05584716796875, -0.07818603515625, -0.039215087890625, ...
jbilcke-hf/sdxl-cyberpunk-2077
2023-10-22T09:14:47.000Z
[ "diffusers", "stable-diffusion-xl", "stable-diffusion-xl-diffusers", "text-to-image", "lora", "dataset:jbilcke-hf/cyberpunk-2077", "region:us" ]
text-to-image
jbilcke-hf
null
null
jbilcke-hf/sdxl-cyberpunk-2077
1
482
diffusers
2023-10-21T18:45:25
--- base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: cyberpunk-2077 tags: - stable-diffusion-xl - stable-diffusion-xl-diffusers - text-to-image - diffusers - lora inference: true datasets: - jbilcke-hf/cyberpunk-2077 --- # LoRA DreamBooth - jbilcke-hf/sdxl-cyberpunk-2077 These are LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0 trained on @fffiloni's SD-XL trainer. The weights were trained on the concept prompt: ``` cyberpunk-2077 ``` Use this keyword to trigger your custom model in your prompts. LoRA for the text encoder was enabled: False. Special VAE used for training: madebyollin/sdxl-vae-fp16-fix. ## Usage Make sure to upgrade diffusers to >= 0.19.0: ``` pip install diffusers --upgrade ``` In addition make sure to install transformers, safetensors, accelerate as well as the invisible watermark: ``` pip install invisible_watermark transformers accelerate safetensors ``` To just use the base model, you can run: ```python import torch from diffusers import DiffusionPipeline, AutoencoderKL device = "cuda" if torch.cuda.is_available() else "cpu" vae = AutoencoderKL.from_pretrained('madebyollin/sdxl-vae-fp16-fix', torch_dtype=torch.float16) pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True ) pipe.to(device) # This is where you load your trained weights specific_safetensors = "pytorch_lora_weights.safetensors" lora_scale = 0.9 pipe.load_lora_weights( 'jbilcke-hf/sdxl-cyberpunk-2077', weight_name = specific_safetensors, # use_auth_token = True ) prompt = "A majestic cyberpunk-2077 jumping from a big stone at night" image = pipe( prompt=prompt, num_inference_steps=50, cross_attention_kwargs={"scale": lora_scale} ).images[0] ```
1,851
[ [ -0.0199432373046875, -0.0325927734375, 0.03302001953125, 0.01678466796875, -0.0259552001953125, 0.011444091796875, 0.01500701904296875, -0.0186767578125, 0.04345703125, 0.03466796875, -0.042266845703125, -0.024200439453125, -0.059295654296875, -0.00572586059...
cl-nagoya/sup-simcse-ja-large
2023-10-05T06:33:57.000Z
[ "sentence-transformers", "pytorch", "bert", "feature-extraction", "sentence-similarity", "transformers", "ja", "dataset:shunk031/jsnli", "license:cc-by-sa-4.0", "region:us", "has_space" ]
feature-extraction
cl-nagoya
null
null
cl-nagoya/sup-simcse-ja-large
7
481
sentence-transformers
2023-10-02T09:43:39
--- tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers datasets: - shunk031/jsnli license: cc-by-sa-4.0 language: - ja metrics: - spearmanr library_name: sentence-transformers inference: false --- # sup-simcse-ja-large ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U fugashi[unidic-lite] sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["こんにちは、世界!", "文埋め込み最高!文埋め込み最高と叫びなさい", "極度乾燥しなさい"] model = SentenceTransformer("cl-nagoya/sup-simcse-ja-large") embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch def cls_pooling(model_output, attention_mask): return model_output[0][:,0] # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained("cl-nagoya/sup-simcse-ja-large") model = AutoModel.from_pretrained("cl-nagoya/sup-simcse-ja-large") # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, cls pooling. sentence_embeddings = cls_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Model Summary - Fine-tuning method: Supervised SimCSE - Base model: [cl-tohoku/bert-large-japanese-v2](https://huggingface.co/cl-tohoku/bert-large-japanese-v2) - Training dataset: [JSNLI](https://nlp.ist.i.kyoto-u.ac.jp/?%E6%97%A5%E6%9C%AC%E8%AA%9ESNLI%28JSNLI%29%E3%83%87%E3%83%BC%E3%82%BF%E3%82%BB%E3%83%83%E3%83%88) - Pooling strategy: cls (with an extra MLP layer only during training) - Hidden size: 1024 - Learning rate: 5e-5 - Batch size: 512 - Temperature: 0.05 - Max sequence length: 64 - Number of training examples: 2^20 - Validation interval (steps): 2^6 - Warmup ratio: 0.1 - Dtype: BFloat16 See the [GitHub repository](https://github.com/hppRC/simple-simcse-ja) for a detailed experimental setup. ## Citing & Authors ``` @misc{ hayato-tsukagoshi-2023-simple-simcse-ja, author = {Hayato Tsukagoshi}, title = {Japanese Simple-SimCSE}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/hppRC/simple-simcse-ja}} } ```
3,243
[ [ -0.03424072265625, -0.038116455078125, 0.01837158203125, 0.0254974365234375, -0.03173828125, -0.0191192626953125, -0.03955078125, -0.009063720703125, 0.016693115234375, 0.021026611328125, -0.054656982421875, -0.026824951171875, -0.037200927734375, 0.01020050...
NeverSleep/Mistral-11B-OmniMix-bf16
2023-10-15T21:56:40.000Z
[ "transformers", "safetensors", "mistral", "text-generation", "license:cc-by-nc-4.0", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
NeverSleep
null
null
NeverSleep/Mistral-11B-OmniMix-bf16
12
481
transformers
2023-10-12T16:33:02
--- license: cc-by-nc-4.0 --- This model should be fixed, it was MEANT to be BF16. Don't mind this one at the moment, I need to finetune it for RP, it's just a test. ## Description This repo contains fp16 files of Mistral-11B-OmniMix-bf16. My goal for this model was only to make it score the highest possible with merge and layer toying, proving that: - Benchmark are objective - You should try a model yourself and don't go blindly to the highest rated one - Merge/Layer toying CAN be usable to do better model (maybe?) ## Model used - [Mistral-7B-OpenOrca](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca) - [Mistral-7B-v0.1-Open-Platypus](https://huggingface.co/akjindal53244/Mistral-7B-v0.1-Open-Platypus) - [CollectiveCognition-v1.1-Mistral-7B](https://huggingface.co/teknium/CollectiveCognition-v1.1-Mistral-7B) - [zephyr-7b-alpha](https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha) ## Prompt template The best one after further testing is this one: ``` <|system|> Below is an instruction that describes a task. Write a response that appropriately completes the request. <|user|> {prompt} <|assistant|> ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ab1241ad514ca8d1430003/tWIx8yeoallv94zrhN6L-.png) But these one work too: ``` Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ``` ``` USER: <prompt> ASSISTANT: ``` Or use any prompting system from one of the 4 source model, should work. ## The secret sauce Mistral-11B-OpenOrcaPlatypus : ``` slices: - sources: - model: Open-Orca/Mistral-7B-OpenOrca layer_range: [0, 24] - sources: - model: akjindal53244/Mistral-7B-v0.1-Open-Platypus layer_range: [8, 32] merge_method: passthrough dtype: bfloat16 ``` Mistral-11B-CC-Zephyr : ``` slices: - sources: - model: "/content/drive/MyDrive/CC-v1.1-7B-bf16" layer_range: [0, 24] - sources: - model: "/content/drive/MyDrive/Zephyr-7B" layer_range: [8, 32] merge_method: passthrough dtype: bfloat16 ``` Mistral-11B-OmniMix : ``` slices: - sources: - model: Mistral-11B-OpenOrcaPlatypus layer_range: [0, 48] - model: Mistral-11B-CC-Zephyr layer_range: [0, 48] merge_method: slerp base_model: Mistral-11B-OpenOrcaPlatypus parameters: t: - filter: lm_head value: [0.75] - filter: embed_tokens value: [0.75] - filter: self_attn value: [0.75, 0.25] - filter: mlp value: [0.25, 0.75] - filter: layernorm value: [0.5, 0.5] - filter: modelnorm value: [0.75] - value: 0.5 # fallback for rest of tensors dtype: bfloat16 ``` I use [mergekit](https://github.com/cg123/mergekit) for all the manipulation told here. ## Some scoring I done myself ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ab1241ad514ca8d1430003/rnraBZz-I9CUD1GVNVF00.png) hf-causal-experimental (pretrained=/content/drive/MyDrive/Mistral-11B-OmniMix-bf16), limit: None, provide_description: False, num_fewshot: 0, batch_size: 4 | Task |Version| Metric |Value | |Stderr| |-------------|------:|--------|-----:|---|-----:| |arc_challenge| 0|acc |0.5580|± |0.0145| | | |acc_norm|0.5819|± |0.0144| |arc_easy | 0|acc |0.8300|± |0.0077| | | |acc_norm|0.8211|± |0.0079| |hellaswag | 0|acc |0.6372|± |0.0048| | | |acc_norm|0.8209|± |0.0038| |piqa | 0|acc |0.8145|± |0.0091| | | |acc_norm|0.8286|± |0.0088| |truthfulqa_mc| 1|mc1 |0.3978|± |0.0171| | | |mc2 |0.5680|± |0.0155| |winogrande | 0|acc |0.7427|± |0.0123| ## Others Special thanks to Sushi, [Henky](https://github.com/KoboldAI/KoboldAI-Client) for the machine he give me for big task, and [Charles Goddard](https://github.com/cg123) for his amazing tool. If you want to support me, you can [here](https://ko-fi.com/undiai).
4,043
[ [ -0.045989990234375, -0.044525146484375, 0.0284423828125, 0.0177001953125, -0.004238128662109375, -0.01479339599609375, -0.00818634033203125, -0.0316162109375, 0.0213470458984375, 0.035888671875, -0.04962158203125, -0.035552978515625, -0.05206298828125, -0.00...
ibombonato/vit-age-classifier
2022-02-10T22:06:51.000Z
[ "transformers", "pytorch", "tensorboard", "vit", "image-classification", "huggingpics", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
image-classification
ibombonato
null
null
ibombonato/vit-age-classifier
2
480
transformers
2022-03-02T23:29:05
--- tags: - image-classification - pytorch - huggingpics metrics: - accuracy model-index: - name: vit-age-classifier results: - task: name: Image Classification type: image-classification metrics: - name: Accuracy type: accuracy value: 0.8364999890327454 --- # vit-age-classifier Autogenerated by HuggingPics🤗🖼️ Create your own image classifier for **anything** by running [the demo on Google Colab](https://colab.research.google.com/github/nateraw/huggingpics/blob/main/HuggingPics.ipynb). Report any issues with the demo at the [github repo](https://github.com/nateraw/huggingpics).
632
[ [ -0.0286102294921875, -0.047698974609375, 0.01535797119140625, 0.03704833984375, -0.0330810546875, 0.00305938720703125, 0.01544952392578125, -0.0269927978515625, 0.0188140869140625, 0.004974365234375, -0.032958984375, -0.039276123046875, -0.024505615234375, -...
timm/resnet152.a1_in1k
2023-04-05T18:28:09.000Z
[ "timm", "pytorch", "safetensors", "image-classification", "arxiv:2110.00476", "arxiv:1512.03385", "license:apache-2.0", "region:us" ]
image-classification
timm
null
null
timm/resnet152.a1_in1k
0
480
timm
2023-04-05T18:27:23
--- tags: - image-classification - timm library_tag: timm license: apache-2.0 --- # Model card for resnet152.a1_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 `timm` using recipe template described below. Recipe details: * ResNet Strikes Back `A1` recipe * LAMB optimizer with BCE loss * Cosine LR schedule with warmup ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 60.2 - GMACs: 11.6 - Activations (M): 22.6 - Image size: train = 224 x 224, test = 288 x 288 - **Papers:** - ResNet strikes back: An improved training procedure in timm: https://arxiv.org/abs/2110.00476 - Deep Residual Learning for Image Recognition: https://arxiv.org/abs/1512.03385 - **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('resnet152.a1_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( 'resnet152.a1_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, 256, 56, 56]) # torch.Size([1, 512, 28, 28]) # torch.Size([1, 1024, 14, 14]) # torch.Size([1, 2048, 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( 'resnet152.a1_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, 2048, 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 @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}} } ``` ```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} } ```
38,411
[ [ -0.06524658203125, -0.016998291015625, 0.0019855499267578125, 0.0287017822265625, -0.0311279296875, -0.00908660888671875, -0.009979248046875, -0.029296875, 0.0867919921875, 0.0220184326171875, -0.04876708984375, -0.039794921875, -0.04595947265625, -0.0007729...
VMware/open-llama-13b-open-instruct
2023-07-10T18:41:00.000Z
[ "transformers", "pytorch", "llama", "text-generation", "en", "dataset:VMware/open-instruct-v1-oasst-dolly-hhrlhf", "license:cc-by-sa-3.0", "endpoints_compatible", "text-generation-inference", "region:us", "has_space" ]
text-generation
VMware
null
null
VMware/open-llama-13b-open-instruct
17
480
transformers
2023-06-19T21:53:36
--- license: cc-by-sa-3.0 datasets: - VMware/open-instruct-v1-oasst-dolly-hhrlhf language: - en library_name: transformers pipeline_tag: text-generation --- # VMware/open-llama-13B-open-instruct Instruction-tuned version of the fully trained Open LLama 13B model. The model is open for <b>COMMERCIAL USE</b>. <br> <b> NOTE </b> : The model was trained using the Alpaca prompt template \ <b> NOTE </b> : Fast tokenizer results in incorrect encoding, set the ```use_fast = False``` parameter, when instantiating the tokenizer\ <b> NOTE </b> : The model might struggle with code as the tokenizer merges multiple spaces ## License - <b>Commercially Viable </b> - Instruction dataset, [VMware/open-instruct-v1-oasst-dolly-hhrlhf](https://huggingface.co/datasets/VMware/open-instruct-v1-oasst-dolly-hhrlhf) is under cc-by-sa-3.0 - Language Model, ([openlm-research/open_llama_13b](https://huggingface.co/openlm-research/open_llama_13b)) is under apache-2.0 ## Nomenclature - Model : Open-llama - Model Size: 13B parameters - Dataset: Open-instruct-v1 (oasst,dolly, hhrlhf) ## Use in Transformers ``` import os import torch from transformers import AutoModelForCausalLM, AutoTokenizer model_name = 'VMware/open-llama-13b-open-instruct' tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False) model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map='sequential') prompt_template = "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:" prompt = 'Explain in simple terms how the attention mechanism of a transformer model works' inputt = prompt_template.format(instruction= prompt) input_ids = tokenizer(inputt, return_tensors="pt").input_ids.to("cuda") output1 = model.generate(input_ids, max_length=512) input_length = input_ids.shape[1] output1 = output1[:, input_length:] output = tokenizer.decode(output1[0]) print(output) ``` ## Finetuning details The finetuning scripts will be available in our [RAIL Github Repository](https://github.com/vmware-labs/research-and-development-artificial-intelligence-lab/tree/main/instruction-tuning) ## Evaluation <B>TODO</B>
2,238
[ [ -0.02984619140625, -0.052154541015625, 0.0276031494140625, 0.02923583984375, -0.025421142578125, -0.0260162353515625, -0.0086822509765625, -0.0160064697265625, -0.00441741943359375, 0.043731689453125, -0.06146240234375, -0.04339599609375, -0.049530029296875, ...
ToolBench/ToolBench_IR_bert_based_uncased
2023-07-29T00:55:19.000Z
[ "sentence-transformers", "pytorch", "bert", "feature-extraction", "sentence-similarity", "transformers", "endpoints_compatible", "region:us" ]
sentence-similarity
ToolBench
null
null
ToolBench/ToolBench_IR_bert_based_uncased
12
480
sentence-transformers
2023-07-27T02:29:11
--- pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # {MODEL_NAME} This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. <!--- Describe your model here --> ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('{MODEL_NAME}') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}') model = AutoModel.from_pretrained('{MODEL_NAME}') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, mean pooling. sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results <!--- Describe how your model was evaluated --> For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME}) ## Training The model was trained with the parameters: **DataLoader**: `torch.utils.data.dataloader.DataLoader` of length 15101 with parameters: ``` {'batch_size': 32, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'} ``` **Loss**: `sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters: ``` {'scale': 20.0, 'similarity_fct': 'cos_sim'} ``` Parameters of the fit()-Method: ``` { "epochs": 5, "evaluation_steps": 0, "evaluator": "api_evaluator.APIEvaluator", "max_grad_norm": 1, "optimizer_class": "<class 'torch.optim.adamw.AdamW'>", "optimizer_params": { "lr": 2e-05 }, "scheduler": "WarmupLinear", "steps_per_epoch": null, "warmup_steps": 500, "weight_decay": 0.01 } ``` ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors <!--- Describe where people can find more information -->
3,809
[ [ -0.0203704833984375, -0.06170654296875, 0.02069091796875, 0.023590087890625, -0.0205078125, -0.03204345703125, -0.0191497802734375, 0.0001310110092163086, 0.0169525146484375, 0.0263671875, -0.049346923828125, -0.047637939453125, -0.050689697265625, -0.002508...
Helsinki-NLP/opus-mt-war-en
2023-08-16T12:08:43.000Z
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "war", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
translation
Helsinki-NLP
null
null
Helsinki-NLP/opus-mt-war-en
0
479
transformers
2022-03-02T23:29:04
--- language: - war - en tags: - translation license: apache-2.0 --- ### war-eng * source group: Waray (Philippines) * target group: English * OPUS readme: [war-eng](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/war-eng/README.md) * model: transformer-align * source language(s): war * target language(s): eng * model: transformer-align * pre-processing: normalization + SentencePiece (spm4k,spm4k) * download original weights: [opus-2020-06-16.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/war-eng/opus-2020-06-16.zip) * test set translations: [opus-2020-06-16.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/war-eng/opus-2020-06-16.test.txt) * test set scores: [opus-2020-06-16.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/war-eng/opus-2020-06-16.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | Tatoeba-test.war.eng | 12.3 | 0.308 | ### System Info: - hf_name: war-eng - source_languages: war - target_languages: eng - opus_readme_url: https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/war-eng/README.md - original_repo: Tatoeba-Challenge - tags: ['translation'] - languages: ['war', 'en'] - src_constituents: {'war'} - tgt_constituents: {'eng'} - src_multilingual: False - tgt_multilingual: False - prepro: normalization + SentencePiece (spm4k,spm4k) - url_model: https://object.pouta.csc.fi/Tatoeba-MT-models/war-eng/opus-2020-06-16.zip - url_test_set: https://object.pouta.csc.fi/Tatoeba-MT-models/war-eng/opus-2020-06-16.test.txt - src_alpha3: war - tgt_alpha3: eng - short_pair: war-en - chrF2_score: 0.308 - bleu: 12.3 - brevity_penalty: 1.0 - ref_len: 11345.0 - src_name: Waray (Philippines) - tgt_name: English - train_date: 2020-06-16 - src_alpha2: war - tgt_alpha2: en - prefer_old: False - long_pair: war-eng - helsinki_git_sha: 480fcbe0ee1bf4774bcbe6226ad9f58e63f6c535 - transformers_git_sha: 2207e5d8cb224e954a7cba69fa4ac2309e9ff30b - port_machine: brutasse - port_time: 2020-08-21-14:41
2,079
[ [ -0.03179931640625, -0.037628173828125, 0.0272369384765625, 0.036468505859375, -0.03302001953125, -0.007434844970703125, -0.016510009765625, -0.0254364013671875, 0.0154876708984375, 0.031158447265625, -0.045135498046875, -0.056396484375, -0.0501708984375, 0.0...
kykim/bertshared-kor-base
2023-01-01T17:32:30.000Z
[ "transformers", "pytorch", "encoder-decoder", "text2text-generation", "ko", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text2text-generation
kykim
null
null
kykim/bertshared-kor-base
10
479
transformers
2022-03-02T23:29:05
--- language: ko --- # Bert base model for Korean * 70GB Korean text dataset and 42000 lower-cased subwords are used * Check the model performance and other language models for Korean in [github](https://github.com/kiyoungkim1/LM-kor) ```python # only for pytorch in transformers from transformers import BertTokenizerFast, EncoderDecoderModel tokenizer = BertTokenizerFast.from_pretrained("kykim/bertshared-kor-base") model = EncoderDecoderModel.from_pretrained("kykim/bertshared-kor-base") ```
499
[ [ -0.00827789306640625, -0.039581298828125, 0.0125274658203125, 0.026336669921875, -0.045257568359375, -0.00421142578125, -0.03472900390625, 0.007656097412109375, -0.00324249267578125, 0.033966064453125, -0.031280517578125, -0.046356201171875, -0.0472412109375, ...
timm/regnety_064.ra3_in1k
2023-03-21T06:39:44.000Z
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2003.13678", "license:apache-2.0", "region:us" ]
image-classification
timm
null
null
timm/regnety_064.ra3_in1k
0
479
timm
2023-03-21T06:39:22
--- tags: - image-classification - timm library_tag: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for regnety_064.ra3_in1k A RegNetY-6.4GF image classification model. Trained on ImageNet-1k by Ross Wightman in `timm`. The `timm` RegNet implementation includes a number of enhancements not present in other implementations, including: * stochastic depth * gradient checkpointing * layer-wise LR decay * configurable output stride (dilation) * configurable activation and norm layers * option for a pre-activation bottleneck block used in RegNetV variant * only known RegNetZ model definitions with pretrained weights ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 30.6 - GMACs: 6.4 - Activations (M): 16.4 - Image size: train = 224 x 224, test = 288 x 288 - **Papers:** - Designing Network Design Spaces: https://arxiv.org/abs/2003.13678 - **Dataset:** ImageNet-1k - **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('regnety_064.ra3_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( 'regnety_064.ra3_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, 112, 112]) # torch.Size([1, 144, 56, 56]) # torch.Size([1, 288, 28, 28]) # torch.Size([1, 576, 14, 14]) # torch.Size([1, 1296, 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( 'regnety_064.ra3_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, 1296, 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). For the comparison summary below, the ra_in1k, ra3_in1k, ch_in1k, sw_*, and lion_* tagged weights are trained in `timm`. |model |img_size|top1 |top5 |param_count|gmacs|macts | |-------------------------|--------|------|------|-----------|-----|------| |[regnety_1280.swag_ft_in1k](https://huggingface.co/timm/regnety_1280.swag_ft_in1k)|384 |88.228|98.684|644.81 |374.99|210.2 | |[regnety_320.swag_ft_in1k](https://huggingface.co/timm/regnety_320.swag_ft_in1k)|384 |86.84 |98.364|145.05 |95.0 |88.87 | |[regnety_160.swag_ft_in1k](https://huggingface.co/timm/regnety_160.swag_ft_in1k)|384 |86.024|98.05 |83.59 |46.87|67.67 | |[regnety_160.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.sw_in12k_ft_in1k)|288 |86.004|97.83 |83.59 |26.37|38.07 | |[regnety_1280.swag_lc_in1k](https://huggingface.co/timm/regnety_1280.swag_lc_in1k)|224 |85.996|97.848|644.81 |127.66|71.58 | |[regnety_160.lion_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.lion_in12k_ft_in1k)|288 |85.982|97.844|83.59 |26.37|38.07 | |[regnety_160.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.sw_in12k_ft_in1k)|224 |85.574|97.666|83.59 |15.96|23.04 | |[regnety_160.lion_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.lion_in12k_ft_in1k)|224 |85.564|97.674|83.59 |15.96|23.04 | |[regnety_120.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_120.sw_in12k_ft_in1k)|288 |85.398|97.584|51.82 |20.06|35.34 | |[regnety_2560.seer_ft_in1k](https://huggingface.co/timm/regnety_2560.seer_ft_in1k)|384 |85.15 |97.436|1282.6 |747.83|296.49| |[regnetz_e8.ra3_in1k](https://huggingface.co/timm/regnetz_e8.ra3_in1k)|320 |85.036|97.268|57.7 |15.46|63.94 | |[regnety_120.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_120.sw_in12k_ft_in1k)|224 |84.976|97.416|51.82 |12.14|21.38 | |[regnety_320.swag_lc_in1k](https://huggingface.co/timm/regnety_320.swag_lc_in1k)|224 |84.56 |97.446|145.05 |32.34|30.26 | |[regnetz_040_h.ra3_in1k](https://huggingface.co/timm/regnetz_040_h.ra3_in1k)|320 |84.496|97.004|28.94 |6.43 |37.94 | |[regnetz_e8.ra3_in1k](https://huggingface.co/timm/regnetz_e8.ra3_in1k)|256 |84.436|97.02 |57.7 |9.91 |40.94 | |[regnety_1280.seer_ft_in1k](https://huggingface.co/timm/regnety_1280.seer_ft_in1k)|384 |84.432|97.092|644.81 |374.99|210.2 | |[regnetz_040.ra3_in1k](https://huggingface.co/timm/regnetz_040.ra3_in1k)|320 |84.246|96.93 |27.12 |6.35 |37.78 | |[regnetz_d8.ra3_in1k](https://huggingface.co/timm/regnetz_d8.ra3_in1k)|320 |84.054|96.992|23.37 |6.19 |37.08 | |[regnetz_d8_evos.ch_in1k](https://huggingface.co/timm/regnetz_d8_evos.ch_in1k)|320 |84.038|96.992|23.46 |7.03 |38.92 | |[regnetz_d32.ra3_in1k](https://huggingface.co/timm/regnetz_d32.ra3_in1k)|320 |84.022|96.866|27.58 |9.33 |37.08 | |[regnety_080.ra3_in1k](https://huggingface.co/timm/regnety_080.ra3_in1k)|288 |83.932|96.888|39.18 |13.22|29.69 | |[regnety_640.seer_ft_in1k](https://huggingface.co/timm/regnety_640.seer_ft_in1k)|384 |83.912|96.924|281.38 |188.47|124.83| |[regnety_160.swag_lc_in1k](https://huggingface.co/timm/regnety_160.swag_lc_in1k)|224 |83.778|97.286|83.59 |15.96|23.04 | |[regnetz_040_h.ra3_in1k](https://huggingface.co/timm/regnetz_040_h.ra3_in1k)|256 |83.776|96.704|28.94 |4.12 |24.29 | |[regnetv_064.ra3_in1k](https://huggingface.co/timm/regnetv_064.ra3_in1k)|288 |83.72 |96.75 |30.58 |10.55|27.11 | |[regnety_064.ra3_in1k](https://huggingface.co/timm/regnety_064.ra3_in1k)|288 |83.718|96.724|30.58 |10.56|27.11 | |[regnety_160.deit_in1k](https://huggingface.co/timm/regnety_160.deit_in1k)|288 |83.69 |96.778|83.59 |26.37|38.07 | |[regnetz_040.ra3_in1k](https://huggingface.co/timm/regnetz_040.ra3_in1k)|256 |83.62 |96.704|27.12 |4.06 |24.19 | |[regnetz_d8.ra3_in1k](https://huggingface.co/timm/regnetz_d8.ra3_in1k)|256 |83.438|96.776|23.37 |3.97 |23.74 | |[regnetz_d32.ra3_in1k](https://huggingface.co/timm/regnetz_d32.ra3_in1k)|256 |83.424|96.632|27.58 |5.98 |23.74 | |[regnetz_d8_evos.ch_in1k](https://huggingface.co/timm/regnetz_d8_evos.ch_in1k)|256 |83.36 |96.636|23.46 |4.5 |24.92 | |[regnety_320.seer_ft_in1k](https://huggingface.co/timm/regnety_320.seer_ft_in1k)|384 |83.35 |96.71 |145.05 |95.0 |88.87 | |[regnetv_040.ra3_in1k](https://huggingface.co/timm/regnetv_040.ra3_in1k)|288 |83.204|96.66 |20.64 |6.6 |20.3 | |[regnety_320.tv2_in1k](https://huggingface.co/timm/regnety_320.tv2_in1k)|224 |83.162|96.42 |145.05 |32.34|30.26 | |[regnety_080.ra3_in1k](https://huggingface.co/timm/regnety_080.ra3_in1k)|224 |83.16 |96.486|39.18 |8.0 |17.97 | |[regnetv_064.ra3_in1k](https://huggingface.co/timm/regnetv_064.ra3_in1k)|224 |83.108|96.458|30.58 |6.39 |16.41 | |[regnety_040.ra3_in1k](https://huggingface.co/timm/regnety_040.ra3_in1k)|288 |83.044|96.5 |20.65 |6.61 |20.3 | |[regnety_064.ra3_in1k](https://huggingface.co/timm/regnety_064.ra3_in1k)|224 |83.02 |96.292|30.58 |6.39 |16.41 | |[regnety_160.deit_in1k](https://huggingface.co/timm/regnety_160.deit_in1k)|224 |82.974|96.502|83.59 |15.96|23.04 | |[regnetx_320.tv2_in1k](https://huggingface.co/timm/regnetx_320.tv2_in1k)|224 |82.816|96.208|107.81 |31.81|36.3 | |[regnety_032.ra_in1k](https://huggingface.co/timm/regnety_032.ra_in1k)|288 |82.742|96.418|19.44 |5.29 |18.61 | |[regnety_160.tv2_in1k](https://huggingface.co/timm/regnety_160.tv2_in1k)|224 |82.634|96.22 |83.59 |15.96|23.04 | |[regnetz_c16_evos.ch_in1k](https://huggingface.co/timm/regnetz_c16_evos.ch_in1k)|320 |82.634|96.472|13.49 |3.86 |25.88 | |[regnety_080_tv.tv2_in1k](https://huggingface.co/timm/regnety_080_tv.tv2_in1k)|224 |82.592|96.246|39.38 |8.51 |19.73 | |[regnetx_160.tv2_in1k](https://huggingface.co/timm/regnetx_160.tv2_in1k)|224 |82.564|96.052|54.28 |15.99|25.52 | |[regnetz_c16.ra3_in1k](https://huggingface.co/timm/regnetz_c16.ra3_in1k)|320 |82.51 |96.358|13.46 |3.92 |25.88 | |[regnetv_040.ra3_in1k](https://huggingface.co/timm/regnetv_040.ra3_in1k)|224 |82.44 |96.198|20.64 |4.0 |12.29 | |[regnety_040.ra3_in1k](https://huggingface.co/timm/regnety_040.ra3_in1k)|224 |82.304|96.078|20.65 |4.0 |12.29 | |[regnetz_c16.ra3_in1k](https://huggingface.co/timm/regnetz_c16.ra3_in1k)|256 |82.16 |96.048|13.46 |2.51 |16.57 | |[regnetz_c16_evos.ch_in1k](https://huggingface.co/timm/regnetz_c16_evos.ch_in1k)|256 |81.936|96.15 |13.49 |2.48 |16.57 | |[regnety_032.ra_in1k](https://huggingface.co/timm/regnety_032.ra_in1k)|224 |81.924|95.988|19.44 |3.2 |11.26 | |[regnety_032.tv2_in1k](https://huggingface.co/timm/regnety_032.tv2_in1k)|224 |81.77 |95.842|19.44 |3.2 |11.26 | |[regnetx_080.tv2_in1k](https://huggingface.co/timm/regnetx_080.tv2_in1k)|224 |81.552|95.544|39.57 |8.02 |14.06 | |[regnetx_032.tv2_in1k](https://huggingface.co/timm/regnetx_032.tv2_in1k)|224 |80.924|95.27 |15.3 |3.2 |11.37 | |[regnety_320.pycls_in1k](https://huggingface.co/timm/regnety_320.pycls_in1k)|224 |80.804|95.246|145.05 |32.34|30.26 | |[regnetz_b16.ra3_in1k](https://huggingface.co/timm/regnetz_b16.ra3_in1k)|288 |80.712|95.47 |9.72 |2.39 |16.43 | |[regnety_016.tv2_in1k](https://huggingface.co/timm/regnety_016.tv2_in1k)|224 |80.66 |95.334|11.2 |1.63 |8.04 | |[regnety_120.pycls_in1k](https://huggingface.co/timm/regnety_120.pycls_in1k)|224 |80.37 |95.12 |51.82 |12.14|21.38 | |[regnety_160.pycls_in1k](https://huggingface.co/timm/regnety_160.pycls_in1k)|224 |80.288|94.964|83.59 |15.96|23.04 | |[regnetx_320.pycls_in1k](https://huggingface.co/timm/regnetx_320.pycls_in1k)|224 |80.246|95.01 |107.81 |31.81|36.3 | |[regnety_080.pycls_in1k](https://huggingface.co/timm/regnety_080.pycls_in1k)|224 |79.882|94.834|39.18 |8.0 |17.97 | |[regnetz_b16.ra3_in1k](https://huggingface.co/timm/regnetz_b16.ra3_in1k)|224 |79.872|94.974|9.72 |1.45 |9.95 | |[regnetx_160.pycls_in1k](https://huggingface.co/timm/regnetx_160.pycls_in1k)|224 |79.862|94.828|54.28 |15.99|25.52 | |[regnety_064.pycls_in1k](https://huggingface.co/timm/regnety_064.pycls_in1k)|224 |79.716|94.772|30.58 |6.39 |16.41 | |[regnetx_120.pycls_in1k](https://huggingface.co/timm/regnetx_120.pycls_in1k)|224 |79.592|94.738|46.11 |12.13|21.37 | |[regnetx_016.tv2_in1k](https://huggingface.co/timm/regnetx_016.tv2_in1k)|224 |79.44 |94.772|9.19 |1.62 |7.93 | |[regnety_040.pycls_in1k](https://huggingface.co/timm/regnety_040.pycls_in1k)|224 |79.23 |94.654|20.65 |4.0 |12.29 | |[regnetx_080.pycls_in1k](https://huggingface.co/timm/regnetx_080.pycls_in1k)|224 |79.198|94.55 |39.57 |8.02 |14.06 | |[regnetx_064.pycls_in1k](https://huggingface.co/timm/regnetx_064.pycls_in1k)|224 |79.064|94.454|26.21 |6.49 |16.37 | |[regnety_032.pycls_in1k](https://huggingface.co/timm/regnety_032.pycls_in1k)|224 |78.884|94.412|19.44 |3.2 |11.26 | |[regnety_008_tv.tv2_in1k](https://huggingface.co/timm/regnety_008_tv.tv2_in1k)|224 |78.654|94.388|6.43 |0.84 |5.42 | |[regnetx_040.pycls_in1k](https://huggingface.co/timm/regnetx_040.pycls_in1k)|224 |78.482|94.24 |22.12 |3.99 |12.2 | |[regnetx_032.pycls_in1k](https://huggingface.co/timm/regnetx_032.pycls_in1k)|224 |78.178|94.08 |15.3 |3.2 |11.37 | |[regnety_016.pycls_in1k](https://huggingface.co/timm/regnety_016.pycls_in1k)|224 |77.862|93.73 |11.2 |1.63 |8.04 | |[regnetx_008.tv2_in1k](https://huggingface.co/timm/regnetx_008.tv2_in1k)|224 |77.302|93.672|7.26 |0.81 |5.15 | |[regnetx_016.pycls_in1k](https://huggingface.co/timm/regnetx_016.pycls_in1k)|224 |76.908|93.418|9.19 |1.62 |7.93 | |[regnety_008.pycls_in1k](https://huggingface.co/timm/regnety_008.pycls_in1k)|224 |76.296|93.05 |6.26 |0.81 |5.25 | |[regnety_004.tv2_in1k](https://huggingface.co/timm/regnety_004.tv2_in1k)|224 |75.592|92.712|4.34 |0.41 |3.89 | |[regnety_006.pycls_in1k](https://huggingface.co/timm/regnety_006.pycls_in1k)|224 |75.244|92.518|6.06 |0.61 |4.33 | |[regnetx_008.pycls_in1k](https://huggingface.co/timm/regnetx_008.pycls_in1k)|224 |75.042|92.342|7.26 |0.81 |5.15 | |[regnetx_004_tv.tv2_in1k](https://huggingface.co/timm/regnetx_004_tv.tv2_in1k)|224 |74.57 |92.184|5.5 |0.42 |3.17 | |[regnety_004.pycls_in1k](https://huggingface.co/timm/regnety_004.pycls_in1k)|224 |74.018|91.764|4.34 |0.41 |3.89 | |[regnetx_006.pycls_in1k](https://huggingface.co/timm/regnetx_006.pycls_in1k)|224 |73.862|91.67 |6.2 |0.61 |3.98 | |[regnetx_004.pycls_in1k](https://huggingface.co/timm/regnetx_004.pycls_in1k)|224 |72.38 |90.832|5.16 |0.4 |3.14 | |[regnety_002.pycls_in1k](https://huggingface.co/timm/regnety_002.pycls_in1k)|224 |70.282|89.534|3.16 |0.2 |2.17 | |[regnetx_002.pycls_in1k](https://huggingface.co/timm/regnetx_002.pycls_in1k)|224 |68.752|88.556|2.68 |0.2 |2.16 | ## Citation ```bibtex @InProceedings{Radosavovic2020, title = {Designing Network Design Spaces}, author = {Ilija Radosavovic and Raj Prateek Kosaraju and Ross Girshick and Kaiming He and Piotr Doll{'a}r}, booktitle = {CVPR}, 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}} } ```
15,538
[ [ -0.059783935546875, -0.0170440673828125, -0.0127105712890625, 0.03643798828125, -0.03167724609375, -0.008209228515625, -0.01058197021484375, -0.0399169921875, 0.076171875, 0.005954742431640625, -0.05047607421875, -0.038665771484375, -0.047027587890625, 0.004...
sail-rvc/MichaelJackson
2023-07-14T07:27:59.000Z
[ "transformers", "rvc", "sail-rvc", "audio-to-audio", "endpoints_compatible", "region:us" ]
audio-to-audio
sail-rvc
null
null
sail-rvc/MichaelJackson
0
479
transformers
2023-07-14T07:27:38
--- pipeline_tag: audio-to-audio tags: - rvc - sail-rvc --- # MichaelJackson ## RVC Model ![banner](https://i.imgur.com/xocCjhH.jpg) This model repo was automatically generated. Date: 2023-07-14 07:27:59 Bot Name: juuxnscrap Model Type: RVC Source: https://huggingface.co/juuxn/RVCModels/ Reason: Converting into loadable format for https://github.com/chavinlo/rvc-runpod
382
[ [ -0.0340576171875, -0.0201568603515625, 0.0232696533203125, 0.00464630126953125, -0.0328369140625, 0.0094146728515625, 0.01258087158203125, 0.001598358154296875, 0.02667236328125, 0.072998046875, -0.051483154296875, -0.048797607421875, -0.040191650390625, 0.0...
robinsmits/polylm_1.7b_ft_alpaca_clean_dutch
2023-09-20T21:18:08.000Z
[ "peft", "tensorboard", "generated_from_trainer", "alpaca", "Transformers", "PolyLM", "text-generation-inference", "text-generation", "nl", "dataset:BramVanroy/alpaca-cleaned-dutch", "arxiv:2307.06018", "license:cc-by-nc-4.0", "region:us" ]
text-generation
robinsmits
null
null
robinsmits/polylm_1.7b_ft_alpaca_clean_dutch
0
479
peft
2023-07-21T13:52:11
--- language: - nl license: cc-by-nc-4.0 library_name: peft tags: - generated_from_trainer - alpaca - Transformers - PolyLM - text-generation-inference datasets: - BramVanroy/alpaca-cleaned-dutch inference: false base_model: DAMO-NLP-MT/polylm-1.7b pipeline_tag: text-generation model-index: - name: polylm_1.7b_ft_alpaca_clean_dutch results: [] --- # polylm_1.7b_ft_alpaca_clean_dutch ## Model description This adapter model is a fine-tuned version of [DAMO-NLP-MT/polylm-1.7b](https://huggingface.co/DAMO-NLP-MT/polylm-1.7b). It achieves the following results on the evaluation set: - Loss: 1.8483 Finetuning was performed on the Dutch [BramVanroy/alpaca-cleaned-dutch](https://www.huggingface.co/datasets/BramVanroy/alpaca-cleaned-dutch) dataset which contains 52K of records with instruction following-data translated from English to Dutch. See [DAMO-NLP-MT/polylm-1.7b](https://huggingface.co/DAMO-NLP-MT/polylm-1.7b) for all information about the base model. ## Model usage A basic example of how to use the finetuned model. ``` import torch from peft import AutoPeftModelForCausalLM from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "robinsmits/polylm_1.7b_ft_alpaca_clean_dutch" tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast = False, legacy = False) model = AutoPeftModelForCausalLM.from_pretrained(model_name, device_map = "auto", load_in_4bit = True, torch_dtype = torch.bfloat16) prompt = "### Instructie:\nWat zijn de drie belangrijkste softwareonderdelen die worden gebruikt bij webontwikkeling?\n\n### Antwoord:\n" inputs = tokenizer(prompt, return_tensors = "pt") sample = model.generate(input_ids = inputs.input_ids.cuda(), attention_mask = inputs.attention_mask.cuda(), max_new_tokens = 128, do_sample = True, top_p = 0.85, top_k = 50, temperature = 0.5, repetition_penalty = 1.2, length_penalty = -1.0, num_return_sequences = 1, pad_token_id = tokenizer.eos_token_id, forced_eos_token_id = tokenizer.eos_token_id) output = tokenizer.decode(sample[0], skip_special_tokens = True) print(output.split(prompt)[1]) ``` The prompt and generated output for the above mentioned example is similar to the output shown below. ``` ### Instructie: Wat zijn de drie belangrijkste softwareonderdelen die worden gebruikt bij webontwikkeling? ### Antwoord: De drie belangrijkste softwareonderdelen die worden gebruikt in webontwikkeling zijn HTML, CSS en Javascript.HTML is het hoofdbestand voor alle inhoud op een website.CSS is het hoofdbestand voor decoraties en scripts om te gebruiken zoals JavaScript en PHP.Javascript wordt meestal gebruikt om verschillende functies uit te voeren of het script te manipuleren.Het laatste bestand maakt het mogelijk om code te schrijven dat aan uw website gekoppeld kan worden door middel van enkele woorden. Daarnaast kunnen er ook andere bestanden nodig zijn als gevolg van gebruik van meerdere servers.Een voorbeeld hiervan zou zijn wanneer u bijvoorbeeld een blog-website ``` For more extensive usage and a lot of generated samples (both good and bad samples) see the following [Inference Notebook](https://github.com/RobinSmits/Dutch-LLMs/blob/main/PolyLM_1_7B_Alpaca_Clean_Dutch_Inference.ipynb) ## Intended uses & limitations The PolyLM-1.7B model was trained on 18 languages. The primary focus was to create a multi-lingual Open LLM. Dutch was one of those 18 languages. For training the model a diverse combination of multi-lingual datasets was used. The generated output and performance of this model for the Dutch language is very likely not always comparable to the various Open-Llama models that have been finetuned on English Alpaca datasets. The primary intention of this finetuned model is to explore and research the use of the Dutch language in combination with an Open LLM model. ## Bias, Risks, and Limitations The information below is copied from the base model's [official model card](https://arxiv.org/pdf/2307.06018.pdf): This applies also to the finetuned model. > Our contributions are fully methodological: adding the support of multilingualism to LLM during training and SFT phases. It is unavoidable that PolyLM might exhibit several common deficiencies of language models, e.g. hallucination and toxicity. PolyLM should not be used directly in any application, without a prior assessment of safety and fairness concerns specific to the application. ## Training and evaluation data This model was trained on the [BramVanroy/alpaca-cleaned-dutch](https://www.huggingface.co/datasets/BramVanroy/alpaca-cleaned-dutch) dataset. The dataset is the Dutch translation of the English Alpaca Cleaned instruction dataset. Based on the dataset license only Non-Commercial use is allowed. Commercial use is strictly forbidden. ## Training procedure This model was finetuned with a QLoRA setup on a Google Colab A100 GPU in about 1.5 hours. The notebook used for training can be found here: [Training Notebook](https://github.com/RobinSmits/Dutch-LLMs/blob/main/PolyLM_1_7B_Alpaca_Clean_Dutch_Qlora.ipynb) ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 8 - eval_batch_size: 8 - seed: 42 - gradient_accumulation_steps: 8 - total_train_batch_size: 64 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 64 - num_epochs: 2 The following bitsandbytes quantization config was used during training: - load_in_8bit: False - load_in_4bit: True - llm_int8_threshold: 6.0 - llm_int8_skip_modules: None - llm_int8_enable_fp32_cpu_offload: False - llm_int8_has_fp16_weight: False - bnb_4bit_quant_type: nf4 - bnb_4bit_use_double_quant: True - bnb_4bit_compute_dtype: bfloat16 ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:----:|:---------------:| | 2.1248 | 0.16 | 128 | 2.1129 | | 2.0512 | 0.33 | 256 | 2.0347 | | 1.9983 | 0.49 | 384 | 1.9948 | | 1.9557 | 0.66 | 512 | 1.9655 | | 1.9583 | 0.82 | 640 | 1.9386 | | 1.916 | 0.99 | 768 | 1.9177 | | 1.8671 | 1.15 | 896 | 1.9019 | | 1.8626 | 1.32 | 1024 | 1.8885 | | 1.8321 | 1.48 | 1152 | 1.8762 | | 1.8596 | 1.65 | 1280 | 1.8631 | | 1.843 | 1.81 | 1408 | 1.8539 | | 1.8333 | 1.98 | 1536 | 1.8483 | ### Framework versions - Transformers 4.31.0 - Pytorch 2.0.1+cu118 - Datasets 2.13.1 - Tokenizers 0.13.3 - PEFT 0.4.0
6,871
[ [ -0.05242919921875, -0.05780029296875, 0.00439453125, 0.02117919921875, -0.034271240234375, -0.02276611328125, -0.0179290771484375, -0.03826904296875, 0.0287322998046875, 0.0211334228515625, -0.03839111328125, -0.043731689453125, -0.04620361328125, 0.01901245...
TheBloke/Genz-70b-AWQ
2023-09-27T12:50:26.000Z
[ "transformers", "safetensors", "llama", "text-generation", "en", "license:llama2", "text-generation-inference", "region:us" ]
text-generation
TheBloke
null
null
TheBloke/Genz-70b-AWQ
4
479
transformers
2023-09-19T04:56:58
--- language: - en license: llama2 library_name: transformers model_name: GenZ 70B base_model: budecosystem/genz-70b inference: false model_creator: Bud model_type: llama pipeline_tag: text-generation prompt_template: '### User: {prompt} ### 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 --> # GenZ 70B - AWQ - Model creator: [Bud](https://huggingface.co/budecosystem) - Original model: [GenZ 70B](https://huggingface.co/budecosystem/genz-70b) <!-- description start --> ## Description This repo contains AWQ model files for [Bud's GenZ 70B](https://huggingface.co/budecosystem/genz-70b). ### About AWQ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference. It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB. <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Genz-70b-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Genz-70b-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Genz-70b-GGUF) * [Bud's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/budecosystem/genz-70b) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: User-Assistant-Newlines ``` ### User: {prompt} ### Assistant: ``` <!-- prompt-template end --> <!-- README_AWQ.md-provided-files start --> ## Provided files and AWQ parameters For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM. Models are released as sharded safetensors files. | Branch | Bits | GS | AWQ Dataset | Seq Len | Size | | ------ | ---- | -- | ----------- | ------- | ---- | | [main](https://huggingface.co/TheBloke/Genz-70b-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 36.61 GB <!-- README_AWQ.md-provided-files end --> <!-- README_AWQ.md-use-from-vllm start --> ## Serving this model from vLLM Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/). - When using vLLM as a server, pass the `--quantization awq` parameter, for example: ```shell python3 python -m vllm.entrypoints.api_server --model TheBloke/Genz-70b-AWQ --quantization awq ``` When using vLLM from Python code, pass the `quantization=awq` parameter, for example: ```python from vllm import LLM, SamplingParams prompts = [ "Hello, my name is", "The president of the United States is", "The capital of France is", "The future of AI is", ] sampling_params = SamplingParams(temperature=0.8, top_p=0.95) llm = LLM(model="TheBloke/Genz-70b-AWQ", quantization="awq") outputs = llm.generate(prompts, sampling_params) # Print the outputs. for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") ``` <!-- README_AWQ.md-use-from-vllm start --> <!-- README_AWQ.md-use-from-python start --> ## How to use this AWQ model from Python code ### Install the necessary packages Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later ```shell pip3 install autoawq ``` If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y autoawq git clone https://github.com/casper-hansen/AutoAWQ cd AutoAWQ pip3 install . ``` ### You can then try the following example code ```python from awq import AutoAWQForCausalLM from transformers import AutoTokenizer model_name_or_path = "TheBloke/Genz-70b-AWQ" # Load model model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True, trust_remote_code=False, safetensors=True) tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False) prompt = "Tell me about AI" prompt_template=f'''### User: {prompt} ### Assistant: ''' print("\n\n*** Generate:") tokens = tokenizer( prompt_template, return_tensors='pt' ).input_ids.cuda() # Generate output generation_output = model.generate( tokens, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, max_new_tokens=512 ) print("Output: ", tokenizer.decode(generation_output[0])) # Inference can also be done using transformers' pipeline from transformers import 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_AWQ.md-use-from-python end --> <!-- README_AWQ.md-compatibility start --> ## Compatibility The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm). [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is not yet compatible with AWQ, but a PR is open which should bring support soon: [TGI PR #781](https://github.com/huggingface/text-generation-inference/issues/781). <!-- README_AWQ.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**: 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: Bud's GenZ 70B --- <div align="center"><h1 align="center">~ GenZ ~</h1><img src="https://raw.githubusercontent.com/BudEcosystem/GenZ/main/assets/genz-logo.png" width=150></div> <p align="center"><i>Democratizing access to LLMs for the open-source community.<br>Let's advance AI, together. </i></p> --- ## Introduction 🎉 Welcome to **GenZ**, an advanced Large Language Model (LLM) fine-tuned on the foundation of Meta's open-source Llama V2 70B parameter model. At Bud Ecosystem, we believe in the power of open-source collaboration to drive the advancement of technology at an accelerated pace. Our vision is to democratize access to fine-tuned LLMs, and to that end, we will be releasing a series of models across different parameter counts (7B, 13B, and 70B) and quantizations (32-bit and 4-bit) for the open-source community to use, enhance, and build upon. <p align="center"><img src="https://raw.githubusercontent.com/BudEcosystem/GenZ/main/assets/mt_bench_compare.png" width="500"></p> The smaller quantization version of our models makes them more accessible, enabling their use even on personal computers. This opens up a world of possibilities for developers, researchers, and enthusiasts to experiment with these models and contribute to the collective advancement of language model technology. GenZ isn't just a powerful text generator—it's a sophisticated AI assistant, capable of understanding and responding to user prompts with high-quality responses. We've taken the robust capabilities of Llama V2 and fine-tuned them to offer a more user-focused experience. Whether you're seeking informative responses or engaging interactions, GenZ is designed to deliver. And this isn't the end. It's just the beginning of a journey towards creating more advanced, more efficient, and more accessible language models. We invite you to join us on this exciting journey. 🚀 --- <h2>Milestone Releases ️🏁</h2> **[21 August 2023]** [_GenZ-70B_](https://huggingface.co/budecosystem/genz-70b) : We're excited to announce the release of our Genz 70BB model. Experience the advancements by downloading the model from [HuggingFace](https://huggingface.co/budecosystem/genz-70b). **[27 July 2023]** [_GenZ-13B V2 (ggml)_](https://huggingface.co/budecosystem/genz-13b-v2-ggml) : Announcing our GenZ-13B v2 with ggml. This variant of GenZ can run inferencing using only CPU and without the need of GPU. Download the model from [HuggingFace](https://huggingface.co/budecosystem/genz-13b-v2-ggml). **[27 July 2023]** [_GenZ-13B V2 (4-bit)_](https://huggingface.co/budecosystem/genz-13b-v2-4bit) : Announcing our GenZ-13B v2 with 4-bit quantisation. Enabling inferencing with much lesser GPU memory than the 32-bit variant. Download the model from [HuggingFace](https://huggingface.co/budecosystem/genz-13b-v2-4bit). **[26 July 2023]** [_GenZ-13B V2_](https://huggingface.co/budecosystem/genz-13b-v2) : We're excited to announce the release of our Genz 13B v2 model, a step forward with improved evaluation results compared to v1. Experience the advancements by downloading the model from [HuggingFace](https://huggingface.co/budecosystem/genz-13b-v2). **[20 July 2023]** [_GenZ-13B_](https://huggingface.co/budecosystem/genz-13b) : We marked an important milestone with the release of the Genz 13B model. The journey began here, and you can partake in it by downloading the model from [Hugging Face](https://huggingface.co/budecosystem/genz-13b). --- <h2>Evaluations 🎯</h2> Evaluating our model is a key part of our fine-tuning process. It helps us understand how our model is performing and how it stacks up against other models. Here's a look at some of the key evaluations for GenZ 70B: <h3>Benchmark Comparison</h3> We've compared GenZ models to understand the improvements our fine-tuning has achieved. | Model Name | MT Bench | MMLU | Human Eval | BBH | |:----------:|:--------:|:----:|:----------:|:----:| | Genz 13B | 6.12 | 53.62| 17.68 | 37.76| | Genz 13B v2| 6.79 | 53.68| 21.95 | 38.1 | | Genz 70B | 7.33 | 70.32| 37.8 |54.69 | <h3>MT Bench Score</h3> A key evaluation metric we use is the MT Bench score. This score provides a comprehensive assessment of our model's performance across a range of tasks. <p align="center"><img src="https://raw.githubusercontent.com/BudEcosystem/GenZ/main/assets/mt_bench_score.png" width="500"></p> --- <h2>Getting Started on Hugging Face 🤗</h2> Getting up and running with our models on Hugging Face is a breeze. Follow these steps: <h3>1️⃣ : Import necessary modules</h3> Start by importing the necessary modules from the ‘transformers’ library and ‘torch’. ```python import torch from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("budecosystem/genz-70b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("budecosystem/genz-70b", torch_dtype=torch.bfloat16, rope_scaling={"type": "dynamic", "factor": 2}) prompt = "### User:\nWrite a python flask code for login management\n\n### Assistant:\n" inputs = tokenizer(prompt, return_tensors="pt") sample = model.generate(**inputs, max_length=128) print(tokenizer.decode(sample[0])) ``` Want to interact with the model in a more intuitive way? We have a Gradio interface set up for that. Head over to our GitHub page, clone the repository, and run the ‘generate.py’ script to try it out. Happy experimenting! 😄 <h2>Why Use GenZ? 💡</h2> You might be wondering, "Why should I choose GenZ over a pretrained model?" The answer lies in the extra mile we've gone to fine-tune our models. While pretrained models are undeniably powerful, GenZ brings something extra to the table. We've fine-tuned it with curated datasets, which means it has additional skills and capabilities beyond what a pretrained model can offer. Whether you need it for a simple task or a complex project, GenZ is up for the challenge. What's more, we are committed to continuously enhancing GenZ. We believe in the power of constant learning and improvement. That's why we'll be regularly fine-tuning our models with various curated datasets to make them even better. Our goal is to reach the state of the art and beyond - and we're committed to staying the course until we get there. But don't just take our word for it. We've provided detailed evaluations and performance details in a later section, so you can see the difference for yourself. Choose GenZ and join us on this journey. Together, we can push the boundaries of what's possible with large language models. --- <h2>Model Card for GenZ 70B 📄</h2> Here's a quick overview of everything you need to know about GenZ 70B. <h3>Model Details:</h3> - Developed by: Bud Ecosystem - Base pretrained model type: Llama V2 70B - Model Architecture: GenZ 70B, fine-tuned on Llama V2 70B, is an auto-regressive language model that employs an optimized transformer architecture. The fine-tuning process for GenZ 70B leveraged Supervised Fine-Tuning (SFT) - License: The model is available for commercial use under a custom commercial license. For more information, please visit: [Meta AI Model and Library Downloads](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) --- <h2>Intended Use 💼</h2> When we created GenZ 70B, we had a clear vision of how it could be used to push the boundaries of what's possible with large language models. We also understand the importance of using such models responsibly. Here's a brief overview of the intended and out-of-scope uses for GenZ 70B. <h3>Direct Use</h3> GenZ 70B is designed to be a powerful tool for research on large language models. It's also an excellent foundation for further specialization and fine-tuning for specific use cases, such as: - Text summarization - Text generation - Chatbot creation - And much more! <h3>Out-of-Scope Use 🚩</h3> While GenZ 70B is versatile, there are certain uses that are out of scope: - Production use without adequate assessment of risks and mitigation - Any use cases which may be considered irresponsible or harmful - 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 Licensing Agreement for Llama 2 Remember, GenZ 70B, like any large language model, is trained on a large-scale corpora representative of the web, and therefore, may carry the stereotypes and biases commonly encountered online. <h3>Recommendations 🧠</h3> We recommend users of GenZ 70B to consider fine-tuning it for the specific set of tasks of interest. Appropriate precautions and guardrails should be taken for any production use. Using GenZ 70B responsibly is key to unlocking its full potential while maintaining a safe and respectful environment. --- <h2>Training Details 📚</h2> When fine-tuning GenZ 70B, we took a meticulous approach to ensure we were building on the solid base of the pretrained Llama V2 70B model in the most effective way. Here's a look at the key details of our training process: <h3>Fine-Tuning Training Data</h3> For the fine-tuning process, we used a carefully curated mix of datasets. These included data from OpenAssistant, an instruction fine-tuning dataset, and Thought Source for the Chain Of Thought (CoT) approach. This diverse mix of data sources helped us enhance the model's capabilities across a range of tasks. <h3>Hyperparameters</h3> Here are the hyperparameters we used for fine-tuning: | Hyperparameter | Value | | -------------- | ----- | | Warmup Ratio | 0.04 | | Learning Rate Scheduler Type | Cosine | | Learning Rate | 2e-5 | | Number of Training Epochs | 3 | | Per Device Training Batch Size | 4 | | Gradient Accumulation Steps | 4 | | Precision | FP16 | | Optimizer | AdamW | --- <h2>Looking Ahead 👀</h2> We're excited about the journey ahead with GenZ. We're committed to continuously improving and enhancing our models, and we're excited to see what the open-source community will build with them. We believe in the power of collaboration, and we can't wait to see what we can achieve together. Remember, we're just getting started. This is just the beginning of a journey that we believe will revolutionize the world of large language models. We invite you to join us on this exciting journey. Together, we can push the boundaries of what's possible with AI. 🚀 --- Check the GitHub for the code -> [GenZ](https://raw.githubusercontent.com/BudEcosystem/GenZ)
20,516
[ [ -0.04071044921875, -0.056396484375, 0.0256805419921875, 0.00015854835510253906, -0.0169830322265625, -0.0107421875, 0.006549835205078125, -0.036041259765625, -0.0051422119140625, 0.022064208984375, -0.04815673828125, -0.03668212890625, -0.0190582275390625, -...
dehio/german-qg-t5-quad
2022-01-19T16:36:25.000Z
[ "transformers", "pytorch", "t5", "text2text-generation", "question generation", "de", "dataset:deepset/germanquad", "license:mit", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
dehio
null
null
dehio/german-qg-t5-quad
2
478
transformers
2022-03-02T23:29:05
--- license: mit widget: - text: "Obwohl die Vereinigten Staaten wie auch viele Staaten des Commonwealth Erben des <hl>britischen Common Laws<hl> sind, setzt sich das amerikanische Recht bedeutend davon ab." language: - de tags: - question generation datasets: - deepset/germanquad model-index: - name: german-qg-t5-quad results: [] --- # german-qg-t5-quad This model is fine-tuned in question generation in German. The expected answer must be highlighted with a &lt;hl> token. ## Task example #### Input generate question: Obwohl die Vereinigten Staaten wie auch viele Staaten des Commonwealth Erben des <hl> britischen Common Laws <hl> sind, setzt sich das amerikanische Recht bedeutend davon ab. Dies rührt größtenteils von dem langen Zeitraum her, [...] #### Expected output Von welchem Gesetzt stammt das Amerikanische ab? ## Model description This model is a fine-tuned version of [valhalla/t5-base-qg-hl](https://huggingface.co/valhalla/t5-base-qg-hl) on the [GermanQUAD](https://www.deepset.ai/germanquad) dataset. ## Training and evaluation data The training script can be accessed [here](https://github.com/d-e-h-i-o/german-qg). ### Evaluation The model achieves a BLEU-4 score of **11.30** on the GermanQuAD test set (n=2204). ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 2 - eval_batch_size: 2 - seed: 100 - gradient_accumulation_steps: 8 - total_train_batch_size: 16 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Framework versions - Transformers 4.13.0.dev0 - Pytorch 1.10.0+cu102 - Datasets 1.16.1 - Tokenizers 0.10.3
1,703
[ [ -0.043212890625, -0.061798095703125, 0.0247344970703125, 0.01080322265625, -0.0285186767578125, -0.007068634033203125, -0.0030364990234375, -0.01100921630859375, -0.004062652587890625, 0.023193359375, -0.05084228515625, -0.05859375, -0.036041259765625, 0.007...
bofenghuang/whisper-small-cv11-german
2022-12-27T10:46:47.000Z
[ "transformers", "pytorch", "tensorboard", "whisper", "automatic-speech-recognition", "whisper-event", "de", "dataset:mozilla-foundation/common_voice_11_0", "license:apache-2.0", "model-index", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
bofenghuang
null
null
bofenghuang/whisper-small-cv11-german
4
478
transformers
2022-12-18T13:54:46
--- license: apache-2.0 language: de library_name: transformers thumbnail: null tags: - automatic-speech-recognition - whisper-event datasets: - mozilla-foundation/common_voice_11_0 metrics: - wer model-index: - name: Fine-tuned whisper-small model for ASR in German results: - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Common Voice 11.0 type: mozilla-foundation/common_voice_11_0 config: de split: test args: de metrics: - name: WER (Greedy) type: wer value: 11.35 --- <style> img { display: inline; } </style> ![Model architecture](https://img.shields.io/badge/Model_Architecture-seq2seq-lightgrey) ![Model size](https://img.shields.io/badge/Params-244M-lightgrey) ![Language](https://img.shields.io/badge/Language-German-lightgrey) # Fine-tuned whisper-small model for ASR in German This model is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small), trained on the mozilla-foundation/common_voice_11_0 de dataset. When using the model make sure that your speech input is also sampled at 16Khz. **This model also predicts casing and punctuation.** ## Performance *Below are the WERs of the pre-trained models on the [Common Voice 9.0](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0). These results are reported in the original [paper](https://cdn.openai.com/papers/whisper.pdf).* | Model | Common Voice 9.0 | | --- | :---: | | [openai/whisper-small](https://huggingface.co/openai/whisper-small) | 13.0 | | [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) | 8.5 | | [openai/whisper-large-v2](https://huggingface.co/openai/whisper-large-v2) | 6.4 | *Below are the WERs of the fine-tuned models on the [Common Voice 11.0](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0).* | Model | Common Voice 11.0 | | --- | :---: | | [bofenghuang/whisper-small-cv11-german](https://huggingface.co/bofenghuang/whisper-small-cv11-german) | 11.35 | | [bofenghuang/whisper-medium-cv11-german](https://huggingface.co/bofenghuang/whisper-medium-cv11-german) | 7.05 | | [bofenghuang/whisper-large-v2-cv11-german](https://huggingface.co/bofenghuang/whisper-large-v2-cv11-german) | **5.76** | ## Usage Inference with 🤗 Pipeline ```python import torch from datasets import load_dataset from transformers import pipeline device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") # Load pipeline pipe = pipeline("automatic-speech-recognition", model="bofenghuang/whisper-small-cv11-german", device=device) # NB: set forced_decoder_ids for generation utils pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language="de", task="transcribe") # Load data ds_mcv_test = load_dataset("mozilla-foundation/common_voice_11_0", "de", split="test", streaming=True) test_segment = next(iter(ds_mcv_test)) waveform = test_segment["audio"] # NB: decoding option # limit the maximum number of generated tokens to 225 pipe.model.config.max_length = 225 + 1 # sampling # pipe.model.config.do_sample = True # beam search # pipe.model.config.num_beams = 5 # return # pipe.model.config.return_dict_in_generate = True # pipe.model.config.output_scores = True # pipe.model.config.num_return_sequences = 5 # Run generated_sentences = pipe(waveform)["text"] ``` Inference with 🤗 low-level APIs ```python import torch import torchaudio from datasets import load_dataset from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") # Load model model = AutoModelForSpeechSeq2Seq.from_pretrained("bofenghuang/whisper-small-cv11-german").to(device) processor = AutoProcessor.from_pretrained("bofenghuang/whisper-small-cv11-german", language="german", task="transcribe") # NB: set forced_decoder_ids for generation utils model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(language="de", task="transcribe") # 16_000 model_sample_rate = processor.feature_extractor.sampling_rate # Load data ds_mcv_test = load_dataset("mozilla-foundation/common_voice_11_0", "de", split="test", streaming=True) test_segment = next(iter(ds_mcv_test)) waveform = torch.from_numpy(test_segment["audio"]["array"]) sample_rate = test_segment["audio"]["sampling_rate"] # Resample if sample_rate != model_sample_rate: resampler = torchaudio.transforms.Resample(sample_rate, model_sample_rate) waveform = resampler(waveform) # Get feat inputs = processor(waveform, sampling_rate=model_sample_rate, return_tensors="pt") input_features = inputs.input_features input_features = input_features.to(device) # Generate generated_ids = model.generate(inputs=input_features, max_new_tokens=225) # greedy # generated_ids = model.generate(inputs=input_features, max_new_tokens=225, num_beams=5) # beam search # Detokenize generated_sentences = processor.batch_decode(generated_ids, skip_special_tokens=True)[0] # Normalise predicted sentences if necessary ```
5,066
[ [ -0.03887939453125, -0.0465087890625, 0.01371002197265625, 0.0158538818359375, -0.0187835693359375, -0.00360870361328125, -0.024169921875, -0.0265655517578125, 0.009002685546875, 0.02557373046875, -0.055389404296875, -0.052001953125, -0.04583740234375, -0.003...
Wusul/portaltestchamber
2023-01-28T12:11:43.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
Wusul
null
null
Wusul/portaltestchamber
0
478
diffusers
2023-01-02T21:31:24
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### portaltestchamber Dreambooth model trained by Wusul with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
504
[ [ -0.024261474609375, -0.055816650390625, 0.035980224609375, 0.0292510986328125, -0.017791748046875, 0.0225067138671875, 0.04052734375, -0.0093536376953125, 0.03717041015625, 0.005527496337890625, -0.025543212890625, -0.01531982421875, -0.0211029052734375, -0....
speechbrain/PIQ-ESC50
2023-07-23T02:44:29.000Z
[ "transformers", "Sound Classification", "Interpretable Sound Classification", "PIQ", "Posthoc Interpretation", "Posthoc Interpretation via Quantization", "CNN14", "en", "dataset:ESC50", "arxiv:2303.12659", "arxiv:2106.04624", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
speechbrain
null
null
speechbrain/PIQ-ESC50
2
478
transformers
2023-07-14T19:16:45
--- language: "en" thumbnail: tags: - Sound Classification - Interpretable Sound Classification - PIQ - Posthoc Interpretation - Posthoc Interpretation via Quantization - CNN14 license: "apache-2.0" datasets: - ESC50 --- <iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe> <br/><br/> # PIQ Posthoc Interpreter trained on ESC50 This repository provides all the necessary tools to perform audio posthoc interpretations using the [PIQ](https://arxiv.org/abs/2303.12659) method on a conv-2d classifier, with the following performance on the ESC50 dataset: | Release | Classification Accuracy Valid | Classification Accuracy Test | |:-------------:|:--------------:|:--------------:| | 15-07-23 | 80% | 75% | Please, take a look at the [reference paper](https://arxiv.org/abs/2303.12659) for more info. You can find the training recipe in SpeechBrain [here](https://github.com/speechbrain/speechbrain/tree/develop/recipes/ESC50/interpret). ## Install SpeechBrain First of all, please install SpeechBrain with the following command: ``` pip install speechbrain ``` Please notice that we encourage you to read our tutorials and learn more about [SpeechBrain](https://speechbrain.github.io). ### Perform Interpretable Classification on your own file ```python from speechbrain.pretrained import PIQAudioInterpreter import torchaudio model = PIQAudioInterpreter.from_hparams(source="speechbrain/PIQ-ESC50", savedir='pretrained_models/PIQ-ESC50') x_int_sound_domain, text_lab, fs_model = model.interpret_file('speechbrain/PIQ-ESC50/mix.wav') print('Classification is {}'.format(text_lab)) torchaudio.save("interpretation.wav", x_int_sound_domain.data.cpu(), fs_model) ``` ### Limitations The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets. #### Referencing SpeechBrain ```bibtex @misc{speechbrain, title={{SpeechBrain}: A General-Purpose Speech Toolkit}, author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio}, year={2021}, eprint={2106.04624}, archivePrefix={arXiv}, primaryClass={eess.AS}, note={arXiv:2106.04624} } ``` #### Referencing PIQ If you use this model for your research, please use the following Bibtex to cite it: ```bibtex @misc{paissan2023posthoc, title={Posthoc Interpretation via Quantization}, author={Francesco Paissan and Cem Subakan and Mirco Ravanelli}, year={2023}, eprint={2303.12659}, archivePrefix={arXiv}, primaryClass={cs.AI} } ``` # **About SpeechBrain** - Website: https://speechbrain.github.io/ - Code: https://github.com/speechbrain/speechbrain/ - HuggingFace: https://huggingface.co/speechbrain/
3,152
[ [ -0.0269775390625, -0.033966064453125, 0.01508331298828125, 0.01486968994140625, -0.00849151611328125, -0.015716552734375, -0.0267486572265625, -0.02374267578125, 0.01435089111328125, 0.027130126953125, -0.032318115234375, -0.05975341796875, -0.034088134765625, ...
digiplay/Opiate_v1
2023-07-15T04:39:12.000Z
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "license:other", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
digiplay
null
null
digiplay/Opiate_v1
1
478
diffusers
2023-07-15T04:15:32
--- license: other tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers inference: true --- Model info: https://civitai.com/models/69587?modelVersionId=81796 Original Author's DEMO images : ![](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/e0b3a6db-be0e-4e4f-afee-86391ba38ccb/width=832/00147-1689461531.jpeg) ![](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/321b0cfe-d635-4855-8914-27daef1ce63c/width=832/00129-3711611411.jpeg)
473
[ [ -0.030731201171875, -0.0187835693359375, 0.0343017578125, 0.00705718994140625, -0.0286407470703125, -0.016265869140625, 0.01367950439453125, -0.0012598037719726562, 0.0445556640625, 0.040374755859375, -0.053314208984375, -0.01995849609375, -0.0019407272338867188...
Erlalex/chritofer-v1-1
2023-07-20T18:23:06.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
Erlalex
null
null
Erlalex/chritofer-v1-1
0
478
diffusers
2023-07-20T18:19:04
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### Chritofer_v1.1 Dreambooth model trained by Erlalex with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
503
[ [ -0.0236663818359375, -0.068115234375, 0.042572021484375, 0.0297698974609375, -0.034454345703125, 0.02386474609375, 0.00997161865234375, -0.034576416015625, 0.0506591796875, 0.0149688720703125, -0.0205535888671875, -0.0265960693359375, -0.0297393798828125, -0...
Kha37lid/phokhali
2023-07-21T01:20:53.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
Kha37lid
null
null
Kha37lid/phokhali
0
478
diffusers
2023-07-21T01:08:32
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### Phokhali Dreambooth model trained by Kha37lid with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
498
[ [ -0.0200958251953125, -0.055145263671875, 0.03460693359375, 0.030364990234375, -0.03314208984375, 0.03179931640625, 0.019195556640625, -0.017913818359375, 0.0396728515625, 0.00470733642578125, -0.01500701904296875, -0.0169677734375, -0.028717041015625, -0.009...
TheBloke/CodeLlama-7B-Instruct-AWQ
2023-09-27T12:49:49.000Z
[ "transformers", "safetensors", "llama", "text-generation", "llama-2", "code", "arxiv:2308.12950", "license:llama2", "text-generation-inference", "region:us" ]
text-generation
TheBloke
null
null
TheBloke/CodeLlama-7B-Instruct-AWQ
2
478
transformers
2023-09-19T00:33:48
--- language: - code license: llama2 tags: - llama-2 model_name: CodeLlama 7B Instruct base_model: codellama/CodeLlama-7b-instruct-hf inference: false model_creator: Meta model_type: llama pipeline_tag: text-generation prompt_template: '[INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: {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 --> # CodeLlama 7B Instruct - AWQ - Model creator: [Meta](https://huggingface.co/meta-llama) - Original model: [CodeLlama 7B Instruct](https://huggingface.co/codellama/CodeLlama-7b-instruct-hf) <!-- description start --> ## Description This repo contains AWQ model files for [Meta's CodeLlama 7B Instruct](https://huggingface.co/codellama/CodeLlama-7b-instruct-hf). ### About AWQ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference. It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB. <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF) * [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-7b-instruct-hf) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: CodeLlama ``` [INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: {prompt} [/INST] ``` <!-- prompt-template end --> <!-- README_AWQ.md-provided-files start --> ## Provided files and AWQ parameters For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM. Models are released as sharded safetensors files. | Branch | Bits | GS | AWQ Dataset | Seq Len | Size | | ------ | ---- | -- | ----------- | ------- | ---- | | [main](https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-AWQ/tree/main) | 4 | 128 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 3.89 GB <!-- README_AWQ.md-provided-files end --> <!-- README_AWQ.md-use-from-vllm start --> ## Serving this model from vLLM Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/). - When using vLLM as a server, pass the `--quantization awq` parameter, for example: ```shell python3 python -m vllm.entrypoints.api_server --model TheBloke/CodeLlama-7B-Instruct-AWQ --quantization awq ``` When using vLLM from Python code, pass the `quantization=awq` parameter, for example: ```python from vllm import LLM, SamplingParams prompts = [ "Hello, my name is", "The president of the United States is", "The capital of France is", "The future of AI is", ] sampling_params = SamplingParams(temperature=0.8, top_p=0.95) llm = LLM(model="TheBloke/CodeLlama-7B-Instruct-AWQ", quantization="awq") outputs = llm.generate(prompts, sampling_params) # Print the outputs. for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") ``` <!-- README_AWQ.md-use-from-vllm start --> <!-- README_AWQ.md-use-from-python start --> ## How to use this AWQ model from Python code ### Install the necessary packages Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later ```shell pip3 install autoawq ``` If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y autoawq git clone https://github.com/casper-hansen/AutoAWQ cd AutoAWQ pip3 install . ``` ### You can then try the following example code ```python from awq import AutoAWQForCausalLM from transformers import AutoTokenizer model_name_or_path = "TheBloke/CodeLlama-7B-Instruct-AWQ" # Load model model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True, trust_remote_code=True, safetensors=True) tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True) prompt = "Tell me about AI" prompt_template=f'''[INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: {prompt} [/INST] ''' print("\n\n*** Generate:") tokens = tokenizer( prompt_template, return_tensors='pt' ).input_ids.cuda() # Generate output generation_output = model.generate( tokens, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, max_new_tokens=512 ) print("Output: ", tokenizer.decode(generation_output[0])) # Inference can also be done using transformers' pipeline from transformers import 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_AWQ.md-use-from-python end --> <!-- README_AWQ.md-compatibility start --> ## Compatibility The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm). [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is not yet compatible with AWQ, but a PR is open which should bring support soon: [TGI PR #781](https://github.com/huggingface/text-generation-inference/issues/781). <!-- README_AWQ.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**: 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: Meta's CodeLlama 7B Instruct # **Code Llama** Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This is the repository for the 7B instruct-tuned version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom. | | Base Model | Python | Instruct | | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) | | 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) | | 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) | ## Model Use To use this model, please make sure to install transformers from `main` until the next version is released: ```bash pip install git+https://github.com/huggingface/transformers.git@main accelerate ``` Model capabilities: - [x] Code completion. - [x] Infilling. - [x] Instructions / chat. - [ ] Python specialist. ## Model Details *Note: Use of this model is governed by the Meta license. Meta developed and publicly released the Code Llama family of large language models (LLMs). **Model Developers** Meta **Variations** Code Llama comes in three model sizes, and three variants: * Code Llama: base models designed for general code synthesis and understanding * Code Llama - Python: designed specifically for Python * Code Llama - Instruct: for instruction following and safer deployment All variants are available in sizes of 7B, 13B and 34B parameters. **This repository contains the Instruct version of the 7B parameters model.** **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture. **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950). ## Intended Use **Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications. **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants. ## Hardware and Software **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster. **Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program. ## Training Data All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details). ## Evaluation Results See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper. ## Ethical Considerations and Limitations Code Llama and its variants are a new technology that carries risks with 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, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-user-guide](https://ai.meta.com/llama/responsible-user-guide).
16,728
[ [ -0.036468505859375, -0.057708740234375, 0.027618408203125, 0.0008916854858398438, -0.01456451416015625, -0.01242828369140625, 0.006862640380859375, -0.03411865234375, -0.01103973388671875, 0.0245819091796875, -0.0489501953125, -0.037933349609375, -0.019226074218...
FreedomIntelligence/AceGPT-13B-chat
2023-09-26T08:15:47.000Z
[ "transformers", "pytorch", "llama", "text-generation", "ar", "license:apache-2.0", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
FreedomIntelligence
null
null
FreedomIntelligence/AceGPT-13B-chat
6
478
transformers
2023-09-21T04:45:10
--- license: apache-2.0 language: - ar --- # <b>AceGPT</b> AceGPT is a fully fine-tuned generative text model collection based on LlaMA2, particularly in the Arabic language domain. This is the repository for the 13B-chat pre-trained model. --- ## Model Details We have released the AceGPT family of large language models, which is a collection of fully fine-tuned generative text models based on LlaMA2, ranging from 7B to 13B parameters. Our models include two main categories: AceGPT and AceGPT-chat. AceGPT-chat is an optimized version specifically designed for dialogue applications. It is worth mentioning that our models have demonstrated superior performance compared to all currently available open-source Arabic dialogue models in multiple benchmark tests. Furthermore, in our human evaluations, our models have shown comparable satisfaction levels to some closed-source models, such as ChatGPT, in the Arabic language. ## Model Developers We are from the School of Data Science, the Chinese University of Hong Kong, Shenzhen (CUHKSZ), the Shenzhen Research Institute of Big Data (SRIBD), and the King Abdullah University of Science and Technology (KAUST). ## Variations AceGPT families come in a range of parameter sizes —— 7B and 13B, each size of model has a base category and a -chat category. ## Input Models input text only. ## Output Models output text only. ## Model Evaluation Results Experiments on Arabic Vicuna-80, Arabic AlpacaEval. Numbers are the average performance ratio of ChatGPT over three runs. We do not report the results of raw Llama-2 models since they cannot properly generate Arabic texts. | | Arabic Vicuna-80 | Arabic AlpacaEval | |------------------------------|--------------------|---------------------| | Phoenix Chen et al. (2023a) | 71.92% ± 0.2% | 65.62% ± 0.3% | | Phoenix–multiple-langs Chen et al. (2023b) | 71.67% ± 0.7% | 65.36% ± 0.1% | | Jais-13B-chat Sengupta et al. (2023) | 75.40% ± 1.6% | 74.95% ± 0.2% | | AceGPT-7B-chat | 94.82% ± 0.2% | 93.81% ± 0.1% | | AceGPT-13B-chat | 100.88% ± 0.4% | 97.95% ± 0.1% | ## Samples #### Sample1(alpaca) * question: ما هي أسماء بعض الممثلين المشهورين الذين بدأوا مسيراتهم المهنية على برودواي؟ * answer: 1. مارلون براندو: بدأ مسيرته المهنية على برودواي في أوائل الخمسينيات. 2. روبرت دي نيرو: بدأ مسيرته المهنية على برودواي في أوائل الستينيات. 3. ميريل ستريب: بدأت مسيرتها المهنية على برودواي في أوائل الستينيات. 4. آل باتشينو: بدأ مسيرته المهنية على برودواي في أوائل السبعينيات. 5. كاثرين زيتا جونز: بدأت مسيرتها المهنية على برودواي في أوائل السبعينيات. 6. جود لو: بدأت مسيرتها المهنية على برودواي في أوائل الثمانينيات. 7. توني كورنيت: بدأ مسيرته المهنية على برودواي في أوائل الثمانينيات. 8. هاري كونيك جونيور: بدأ مسيرته المهنية على برودواي في أوائل التسعينيات. 9. أنا باكوين: بدأت مسيرتها المهنية على برودواي في أوائل التسعينيات. 10. ديفيد شويمر: بدأ مسيرته المهنية على برودواي في أوائل التسعينيات. 11. كريستين دانست: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 12. نورا جونز: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 13. جود لو: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 14. جينيفر لوبيز: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 15. ليا ميشيل: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 16. ديفيد ألان غرير: بدأ مسيرته المهنية على برودواي في أوائل الألفية الجديدة. 17. كيت بوسوورث: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 18. دانيال رادكليف: بدأ مسيرته المهنية على برودواي في أوائل الألفية الجديدة. 19. جون ترافولتا: بدأ مسيرته المهنية على برودواي في أوائل الألفية الجديدة. 20. جينيفر هدسون: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 21. كيت وينسلت: بدأ مسيرته المهنية على برودواي في أوائل الألفية الجديدة. 22. جوليا روبرتس: بدأت مسيرتها المهنية على برودواي في أوائل الألفية الجديدة. 23. جود لو: بدأت مسيرتها المهنية على برودواي ف --- #### Sample2(Vicuna) * question: كيف يمكنني تحسين مهارات إدارة الوقت الخاصة بي؟ * answer: 1. تحديد الأولويات: قم بتحديد الأولويات للمهام التي تحتاج إلى القيام بها. استخدم قاعدة الـ80/20 (مبدأ باريتو)، حيث 80٪ من النتائج تأتي من 20٪ من الجهود. 2. تحديد الأهداف: قم بتحديد الأهداف الواضحة والقابلة للقياس والمحددة الزمن لتحقيقها. 3. إنشاء جدول زمني: استخدم جدول زمني لتنظيم يومك. اجعله مرنًا بما يكفي للسماح بالتعديلات ولكن لا تتجاوز الزمن المحدد للمهام. 4. تجنب التأخير: التأخير هو أعداء إدارة الوقت. حاول البدء في المهمة في أقرب وقت ممكن. 5. تجنب التشتت: التشتت يمكن أن يقلل من فعالية إدارة الوقت. حاول التركيز على مهمة واحدة في كل مرة. 6. استخدم الأدوات الرقمية: استخدم التقويمات الرقمية وتطبيقات إدارة المهام لمساعدتك في تتبع الوقت والمهام. 7. استراحات قصيرة: تأكد من أخذ استراحات قصيرة بانتظام لتجنب الإرهاق. 8. تعلم قول \"لا\": لا يمكنك أن تفعل كل شيء. تعلم كيفية رفض المهام التي ليست ضرورية. 9. تحسين البيئة: حافظ على مكان عمل نظيف ومنظم يساعد في تحسين التركيز والإنتاجية. 10. التدريب والتعلم: استمر في تعلم وتحسين مهارات إدارة الوقت. يمكنك الاشتراك في ورش العمل أو الدورات التدريبية أو قراءة الكتب حول الموضوع. 11. الصحة الجيدة: الحفاظ على صحتك البدنية والعقلية يمكن أن يساعد في تحسين إدارة الوقت. النوم الجيد والتغذية السليمة والرياضة يمكن أن تزيد من التركيز والطاقة. 12. تعلم القول \"لا\": تعلم كيفية رفض المهام التي لا تساهم في أهدافك النهائية. 13. تعلم التفويض: لا يمكنك القيام بكل شيء بنفسك. تعلم كيفية التفويض المهام للأشخاص المناسبين. 14. استخدم التقنيات: استخدم التقنيات مثل تقنية بومودورو لتحسين تركيزك وإنتاجيتك. 15. تحديد الأولويات: تعرف ما هو مهم وما هو غير مهم. تركيزك يجب أن يكون على الأشياء التي تحقق أهدافك. 16. تجنب التأجيل: التأجيل هو عدو إدارة الوقت. حاول البدء في المهمة في أقرب وقت ممكن. 17. استخدم القائمة المرتبطة: هذه طريقة فعالة لتتبع المهام التي تحتاج إلى القيام بها. 18. استخدم التقنيات # You can get more detail at https://github.com/FreedomIntelligence/AceGPT/tree/main
5,931
[ [ -0.061767578125, -0.063232421875, 0.04718017578125, 0.0311126708984375, -0.035400390625, -0.01448822021484375, 0.00948333740234375, -0.0362548828125, 0.05242919921875, 0.035919189453125, -0.0280609130859375, -0.05096435546875, -0.057098388671875, 0.014617919...
llmware/industry-bert-sec-v0.1
2023-10-16T18:21:50.000Z
[ "transformers", "pytorch", "bert", "feature-extraction", "arxiv:2104.06979", "license:apache-2.0", "endpoints_compatible", "region:us" ]
feature-extraction
llmware
null
null
llmware/industry-bert-sec-v0.1
3
478
transformers
2023-09-29T21:44:06
--- license: apache-2.0 --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> industry-bert-sec-v0.1 is part of a series of industry-fine-tuned sentence_transformer embedding models. ### Model Description <!-- Provide a longer summary of what this model is. --> industry-bert-sec-v0.1 is a domain fine-tuned BERT-based 768-parameter Sentence Transformer model, intended to as a "drop-in" substitute for embeddings in financial and regulatory domains. This model was trained on a wide range of publicly available U.S. Securities and Exchange Commission (SEC) regulatory filings and related documents. - **Developed by:** llmware - **Model type:** BERT-based Industry domain fine-tuned Sentence Transformer architecture - **Language(s) (NLP):** English - **License:** Apache 2.0 - **Finetuned from model [optional]:** BERT-based model, fine-tuning methodology described below. ## Model Use from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("llmware/industry-bert-sec-v0.1") model = AutoModel.from_pretrained("llmware/industry-bert-sec-v0.1") ## Bias, Risks, and Limitations This is a semantic embedding model, fine-tuned on public domain SEC filings and regulatory documents. Results may vary if used outside of this domain, and like any embedding model, there is always the potential for anomalies in the vector embedding space. No specific safeguards have put in place for safety or mitigate potential bias in the dataset. ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> This model was fine-tuned using a custom self-supervised procedure and custom dataset that combined contrastive techniques with stochastic injections of distortions in the samples. The methodology was derived, adapted and inspired primarily from three research papers cited below: TSDAE (Reimers), DeClutr (Giorgi), and Contrastive Tension (Carlsson). ## Citation [optional] Custom self-supervised training protocol used to train the model, which was derived and inspired by the following papers: @article{wang-2021-TSDAE, title = "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning", author = "Wang, Kexin and Reimers, Nils and Gurevych, Iryna", journal= "arXiv preprint arXiv:2104.06979", month = "4", year = "2021", url = "https://arxiv.org/abs/2104.06979", } @inproceedings{giorgi-etal-2021-declutr, title = {{D}e{CLUTR}: Deep Contrastive Learning for Unsupervised Textual Representations}, author = {Giorgi, John and Nitski, Osvald and Wang, Bo and Bader, Gary}, year = 2021, month = aug, booktitle = {Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)}, publisher = {Association for Computational Linguistics}, address = {Online}, pages = {879--895}, doi = {10.18653/v1/2021.acl-long.72}, url = {https://aclanthology.org/2021.acl-long.72} } @article{Carlsson-2021-CT, title = {Semantic Re-tuning with Contrastive Tension}, author= {Fredrik Carlsson, Amaru Cuba Gyllensten, Evangelia Gogoulou, Erik Ylipää Hellqvist, Magnus Sahlgren}, year= {2021}, month= {"January"} Published: 12 Jan 2021, Last Modified: 05 May 2023 } <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> ## Model Card Contact Darren Oberst @ llmware
3,792
[ [ -0.0260009765625, -0.06005859375, 0.0215301513671875, 0.01525115966796875, -0.03228759765625, -0.016845703125, -0.005359649658203125, -0.0400390625, 0.01824951171875, 0.03497314453125, -0.06121826171875, -0.053009033203125, -0.048858642578125, 0.015052795410...
evilfreelancer/ruGPT-3.5-13B-lora
2023-10-29T11:55:17.000Z
[ "peft", "Saiga", "ruGPT-3.5", "13B", "chat", "lora", "Peft", "adapter", "conversational", "ru", "en", "dataset:IlyaGusev/ru_turbo_alpaca", "dataset:IlyaGusev/ru_turbo_alpaca_evol_instruct", "dataset:IlyaGusev/ru_turbo_saiga", "dataset:IlyaGusev/ru_sharegpt_cleaned", "dataset:IlyaGusev/...
conversational
evilfreelancer
null
null
evilfreelancer/ruGPT-3.5-13B-lora
4
478
peft
2023-10-07T10:18:36
--- license: mit datasets: - IlyaGusev/ru_turbo_alpaca - IlyaGusev/ru_turbo_alpaca_evol_instruct - IlyaGusev/ru_turbo_saiga - IlyaGusev/ru_sharegpt_cleaned - IlyaGusev/oasst1_ru_main_branch - IlyaGusev/gpt_roleplay_realm - lksy/ru_instruct_gpt4 language: - ru - en library_name: peft pipeline_tag: conversational tags: - Saiga - ruGPT-3.5 - 13B - chat - lora - Peft - adapter --- # ruGPT-3.5 13B LoRA: Adapter-Only Version Welcome to the adapter-only version of ruGPT-3.5 13B LoRA. This model is built upon the foundation of [ruGPT-3.5-13B](https://huggingface.co/ai-forever/ruGPT-3.5-13B). 📌 Important: This model was trained using settings identical to [GigaSaiga](https://huggingface.co/IlyaGusev/gigasaiga_lora), but incorporates additional dataset. 🔗 Training code is [here](https://github.com/EvilFreelancer/ruGPT-3.5-13B-lora). > Note: If you prefer, you can opt to use the ruGPT-3.5 13B fp16 base model. ## Code sample ```python import torch from peft import PeftModel, PeftConfig from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig MODEL_NAME = "evilfreelancer/ruGPT-3.5-13B-lora" DEFAULT_MESSAGE_TEMPLATE = "<s>{role}\n{content}</s>\n" DEFAULT_SYSTEM_PROMPT = "Ты — ruGPT-3.5, русскоязычный автоматический ассистент на 13 миллиардов параметров. Ты разговариваешь с людьми и помогаешь им." class Conversation: def __init__( self, message_template=DEFAULT_MESSAGE_TEMPLATE, system_prompt=DEFAULT_SYSTEM_PROMPT, start_token_id=2, bot_token_id=46787 ): self.message_template = message_template self.start_token_id = start_token_id self.bot_token_id = bot_token_id self.messages = [{ "role": "system", "content": system_prompt }] def get_start_token_id(self): return self.start_token_id def get_bot_token_id(self): return self.bot_token_id def add_user_message(self, message): self.messages.append({ "role": "user", "content": message }) def add_bot_message(self, message): self.messages.append({ "role": "bot", "content": message }) def get_prompt(self, tokenizer): final_text = "" for message in self.messages: message_text = self.message_template.format(**message) final_text += message_text final_text += tokenizer.decode([self.start_token_id, self.bot_token_id]) return final_text.strip() def generate(model, tokenizer, prompt, generation_config): data = tokenizer(prompt, return_tensors="pt") data = {k: v.to(model.device) for k, v in data.items()} output_ids = model.generate( **data, generation_config=generation_config )[0] output_ids = output_ids[len(data["input_ids"][0]):] output = tokenizer.decode(output_ids, skip_special_tokens=True) return output.strip() config = PeftConfig.from_pretrained(MODEL_NAME) model = AutoModelForCausalLM.from_pretrained( config.base_model_name_or_path, load_in_8bit=True, torch_dtype=torch.float16, device_map="auto" ) model = PeftModel.from_pretrained( model, MODEL_NAME, torch_dtype=torch.float16 ) model.eval() tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, use_fast=False) generation_config = GenerationConfig.from_pretrained(MODEL_NAME) print(generation_config) conversation = Conversation() while True: user_message = input("User: ") if user_message.strip() == "/reset": conversation = Conversation() print("History reset completed!") continue if user_message.strip() == "": continue conversation.add_user_message(user_message) prompt = conversation.get_prompt(tokenizer) output = generate( model=model, tokenizer=tokenizer, prompt=prompt, generation_config=generation_config ) conversation.add_bot_message(output) print("ruGPT-3.5:", output) print() print("==============================") print() ``` ## Examples ```text User: Привет! Почему трава зелёная? ruGPT-3.5: Трава зелёная благодаря хлорофиллу - пигменту растений, который поглощает световые волны определенной длины и преобразует их в энергию химических связей. Хлорофилл также обеспечивает растения питательными веществами из почвы через фотосинтез. ``` ```text User: Придумай стишок про нейросети. ruGPT-3.5: Нейросеть – это чудо науки, Она способна решать любые задачи. И если ты хочешь стать программистом, То лучше всего изучать нейронные сети. ``` ```text User: Высота самой высокой горы на Земле? ruGPT-3.5: Самая высокая гора на Земле находится в Гималаях и называется Эверест (8848 метров). ``` ```text User: Сколько максимум лет может прожить галопогосская черепаха? ruGPT-3.5: Галопогосские черепахи могут жить до 100 лет и более. Они являются одними из самых долгоживущих животных на планете. ``` ## 📚 Training Datasets The datasets utilized for training this model are consistent with those used for [Saiga-2](https://github.com/IlyaGusev/rulm). Here's the comprehensive list: - [ru_turbo_alpaca](https://huggingface.co/datasets/IlyaGusev/ru_turbo_alpaca) - [ru_turbo_alpaca_evol_instruct](https://huggingface.co/datasets/IlyaGusev/ru_turbo_alpaca_evol_instruct) - [ru_turbo_saiga](https://huggingface.co/datasets/IlyaGusev/ru_turbo_saiga) - [ru_sharegpt_cleaned](https://huggingface.co/datasets/IlyaGusev/ru_sharegpt_cleaned) - [oasst1_ru_main_branch](https://huggingface.co/datasets/IlyaGusev/oasst1_ru_main_branch) - [gpt_roleplay_realm](https://huggingface.co/datasets/IlyaGusev/gpt_roleplay_realm) - [ru_instruct_gpt4](https://huggingface.co/datasets/lksy/ru_instruct_gpt4) ## 🛠 Training Procedure The following `bitsandbytes` quantization config was used during training: - quant_method: bitsandbytes - load_in_8bit: True - load_in_4bit: False - llm_int8_threshold: 6.0 - llm_int8_skip_modules: None - llm_int8_enable_fp32_cpu_offload: False - llm_int8_has_fp16_weight: False - bnb_4bit_quant_type: fp4 - bnb_4bit_use_double_quant: False - bnb_4bit_compute_dtype: float32 ## ⚙️ Framework Versions Ensure you have the following framework versions for compatibility: - PyTorch 2.1.0 - PEFT 0.5.0 - bitsandbytes 0.41.1 - transformers 4.34.0 ## Links - https://t.me/evilfreelancer - https://dzen.ru/evilfreelancer
6,419
[ [ -0.034881591796875, -0.055816650390625, 0.00930023193359375, 0.01438140869140625, -0.0232696533203125, -0.00513458251953125, -0.007061004638671875, -0.02276611328125, -0.0002803802490234375, 0.0146942138671875, -0.045196533203125, -0.036651611328125, -0.03613281...
Linus4Lyf/petearch
2023-03-12T14:00:33.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
Linus4Lyf
null
null
Linus4Lyf/petearch
0
477
diffusers
2023-03-12T13:50:34
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### PeteArch Dreambooth model trained by Linus4Lyf with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
499
[ [ -0.0276336669921875, -0.053192138671875, 0.05059814453125, 0.046417236328125, -0.0198211669921875, 0.0286102294921875, 0.01788330078125, -0.0281829833984375, 0.050506591796875, 0.00940704345703125, -0.020782470703125, -0.01458740234375, -0.0309600830078125, ...
Hemlok/REV-Mix
2023-08-26T16:19:02.000Z
[ "diffusers", "stable-diffusion", "text-to-image", "art", "ja", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
Hemlok
null
null
Hemlok/REV-Mix
5
477
diffusers
2023-08-06T17:04:53
--- license: creativeml-openrail-m language: - ja tags: - stable-diffusion - text-to-image - art library_name: diffusers --- # ◆REV-Mix ![](Images/logo.png) - "レボリューション"なモデルです。 - DateMixやRDtMixを意識して作成しました。 ---- # ◆Discord [Join Discord Server](https://discord.gg/eN6aSWRddT) - Hemlokのマージコミュニティです。レシピとか裏話はこちら。 ---- # ◆モデル概要 ## ■REV-I - Sampler: DDIM or DPM++ SDE Karras 推奨。 - Steps: 40~ - Clipskip: 2 - CFG Scale: 5~8 - Denoise strength: 0.6 - クオリティタグ(masterpiece,best quality等)は入れなくても大丈夫です。お好みでどうぞ。 - 別途embeddingsをおすすめします。 - ◆アニメ系モデル。通常はこちら。 ## ■REV-R - Sampler: DDIM or DPM++ SDE Karras 推奨。 - Steps: 40~ - Clipskip: 2 - CFG Scale: 5~8 - Denoise strength: 0.6 - クオリティタグ(masterpiece,best quality等)は入れなくても大丈夫です。お好みでどうぞ。 - 別途embeddingsをおすすめします。 - ◆リアル系モデル。リアルモデルの比率を大幅に上げています。 ---- # ◆サンプル ## ■REV-I ![](Images/1-1.png) ## ■REV-R ![](Images/1-2.png) - Prompt: ``` cowboy shot, long {white|blonde|black} hair, glossy, realistic textures, kawaii, (Gothic Lolita dress), Gorgeous Clothing, clothes that reveal little, [cute smile], in room, ``` --- ## ■REV-I ![](Images/2-1.png) ## ■REV-R ![](Images/2-2.png) - Prompt: ``` (cowboy shot), (dynamic angle), Ruffled Dresses, (The great hall of the mansion), tiara, Luxurious interior, looking at viewer, ``` --- ## ■REV-I ![](Images/3-1.png) ## ■REV-R ![](Images/3-2.png) - Prompt: ``` (cowboy shot), looking at viewer, 1girl, Pirate, globe, starry eyed, ✌, ;), Revolution, gorgeous ``` --- # ◆モデルの使い方 - モデルをダウンロードしてWebUI等でご使用ください。 - モデルはModelsフォルダの中にあります。 --- ## 🧨Diffusers - Diffusersを使用する際は以下のコードを利用してください。 ```python from diffusers import StableDiffusionPipeline import torch model_id = "Hemlok/REV-Mix" pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) pipe = pipe.to("cuda") prompt = "One girl standing by the window" image = pipe(prompt).images[0] image.save("test.png") ``` ---- # 免責事項 - SFWおよびNSFW画像の作成は、個々のクリエイターの判断によります。モデル製作者は責任を負いません。 - このモデルは、公共の場などでNSFWコンテンツを公開するために作られたモデルではありません。 ---- # ライセンス - このモデルはオープンアクセスで誰でも利用可能であり、CreativeML OpenRAIL-Mライセンスでさらに権利と使用方法が規定されています。 - CreativeML OpenRAILライセンスでは、次のように規定されています。 1. このモデルを使用して、違法または有害な出力やコンテンツを意図的に作成したり、共有したりすることはできません。 2. 作者はあなたが生成した出力に対していかなる権利も主張しません。あなたはそれらを自由に使用することができますが、ライセンスで定められた規定を守ってください。利用は自己責任でお願いします。 3. あなたはウェイトを再配布し、モデルを商業的またはサービスとして使用することができます。その場合、ライセンスにあるものと同じ使用制限を含め、CreativeML OpenRAIL-Mのコピーをあなたのすべてのユーザーに共有しなければならないことに注意してください(ライセンスを完全にかつ注意深く読んでください)。 - (ライセンスの全文: [https://huggingface.co/spaces/CompVis/stable-diffusion-license](https://huggingface.co/spaces/CompVis/stable-diffusion-license))
2,604
[ [ -0.0452880859375, -0.061767578125, 0.0213775634765625, 0.037353515625, -0.037017822265625, -0.00777435302734375, 0.00461578369140625, -0.0252532958984375, 0.034149169921875, 0.031982421875, -0.06524658203125, -0.05865478515625, -0.040313720703125, 0.00502014...
dq158/morbius
2023-10-30T04:38:38.000Z
[ "transformers", "pytorch", "t5", "text2text-generation", "generated_from_trainer", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
dq158
null
null
dq158/morbius
0
477
transformers
2023-10-02T01:54:31
--- tags: - generated_from_trainer metrics: - bleu model-index: - name: morbius 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. --> # morbius This model was trained from scratch on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 2.3311 - Bleu: 0.0490 - Precisions: [0.12658339197748064, 0.058000714881448825, 0.031020853918560506, 0.0276665140764477] - Brevity Penalty: 0.9781 - Length Ratio: 0.9783 - Translation Length: 45472 - Reference Length: 46479 ## 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: 12 - eval_batch_size: 12 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Bleu | Precisions | Brevity Penalty | Length Ratio | Translation Length | Reference Length | |:-------------:|:-----:|:-----:|:---------------:|:------:|:--------------------------------------------------------------------------------------:|:---------------:|:------------:|:------------------:|:----------------:| | 2.6085 | 1.0 | 2630 | 2.3793 | 0.0398 | [0.11484440108136675, 0.05086452177719413, 0.022402389588222743, 0.019262093750807972] | 1.0 | 1.0585 | 49197 | 46479 | | 2.5537 | 2.0 | 5260 | 2.3538 | 0.0451 | [0.12435074854873206, 0.053338059789672695, 0.02736549165120594, 0.024163621427155037] | 0.9858 | 0.9859 | 45822 | 46479 | | 2.427 | 3.0 | 7890 | 2.3412 | 0.0478 | [0.12566410537870473, 0.05610922151130985, 0.029971974257836827, 0.026891236083357122] | 0.9798 | 0.9800 | 45550 | 46479 | | 2.3716 | 4.0 | 10520 | 2.3347 | 0.0487 | [0.12663965838169275, 0.0574505431946487, 0.030477866031926728, 0.027230821761893922] | 0.9823 | 0.9825 | 45665 | 46479 | | 2.3494 | 5.0 | 13150 | 2.3311 | 0.0490 | [0.12658339197748064, 0.058000714881448825, 0.031020853918560506, 0.0276665140764477] | 0.9781 | 0.9783 | 45472 | 46479 | ### Framework versions - Transformers 4.34.0 - Pytorch 2.0.1+cu118 - Datasets 2.14.5 - Tokenizers 0.14.0
2,794
[ [ -0.044219970703125, -0.0313720703125, 0.0191802978515625, 0.005809783935546875, -0.0174407958984375, -0.024627685546875, 0.0014352798461914062, -0.0169830322265625, 0.037872314453125, 0.0276947021484375, -0.037933349609375, -0.05084228515625, -0.05047607421875, ...
speechbrain/cnn14-esc50
2023-07-13T23:06:44.000Z
[ "Sound Classification", "CNN14", "en", "dataset:ESC50", "arxiv:1912.10211", "arxiv:2106.04624", "arxiv:2205.07390", "license:apache-2.0", "region:us" ]
null
speechbrain
null
null
speechbrain/cnn14-esc50
1
476
null
2022-11-30T16:18:58
--- language: "en" thumbnail: tags: - Sound Classification - CNN14 license: "apache-2.0" datasets: - ESC50 --- <iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe> <br/><br/> # CNN14 Trained on VGGSound dataset with SimCLR and Fine Tuned on ESC50 This repository provides all the necessary tools to perform audip classification with [CNN14 model](https://arxiv.org/abs/1912.10211) model, implemented with SpeechBrain. For a better experience we encourage you to learn more about [SpeechBrain](https://speechbrain.github.io). The encoder is first trained with SimCLR on the VGGGSound dataset, and then fine tuned on ESC50 folds 1,2,3. | Release | Classification Accuracy Valid | Classification Accuracy Test | |:-------------:|:--------------:|:--------------:| | 26-11-22 | 90% | 82% | ## Install SpeechBrain First of all, please install SpeechBrain with the following command: ``` pip install speechbrain ``` Please notice that we encourage you to read our tutorials and learn more about [SpeechBrain](https://speechbrain.github.io). ### Perform Classification on your own file ```python from speechbrain.pretrained import AudioClassifier model = AudioClassifier.from_hparams(source="speechbrain/cnn14-esc50", savedir='pretrained_models/cnn14-esc50') out_probs, score, index, text_lab = model.classify_file('speechbrain/cnn14-esc50/example_dogbark.wav') print(text_lab) ``` ### Limitations The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets. #### Referencing SpeechBrain ```bibtex @misc{speechbrain, title={{SpeechBrain}: A General-Purpose Speech Toolkit}, author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio}, year={2021}, eprint={2106.04624}, archivePrefix={arXiv}, primaryClass={eess.AS}, note={arXiv:2106.04624} } ``` #### Referencing This Pretrained Model The encoder is originally trained for our [paper](https://arxiv.org/pdf/2205.07390.pdf). You can reference our paper if you use this model for your research. ```bibtex @inproceedings{wang2022CRL, title={Learning Representations for New Sound Classes With Continual Self-Supervised Learning}, author={Zhepei Wang, Cem Subakan, Xilin Jiang, Junkai Wu, Efthymios Tzinis, Mirco Ravanelli, Paris Smaragdis}, year={2022}, booktitle={Accepted to IEEE Signal Processing Letters} } ``` # **About SpeechBrain** - Website: https://speechbrain.github.io/ - Code: https://github.com/speechbrain/speechbrain/ - HuggingFace: https://huggingface.co/speechbrain/
3,027
[ [ -0.043914794921875, -0.028717041015625, 0.006664276123046875, 0.0080108642578125, -0.0078582763671875, -0.016693115234375, -0.043914794921875, -0.030731201171875, 0.005107879638671875, 0.0067901611328125, -0.04742431640625, -0.062347412109375, -0.040557861328125...
michelecafagna26/t5-base-finetuned-sst2-sentiment
2023-04-06T13:54:46.000Z
[ "transformers", "pytorch", "safetensors", "t5", "text2text-generation", "text-classification", "en", "dataset:sst2", "arxiv:1910.10683", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-classification
michelecafagna26
null
null
michelecafagna26/t5-base-finetuned-sst2-sentiment
0
476
transformers
2022-12-04T19:12:45
--- license: apache-2.0 language: en datasets: - sst2 metrics: - precision - recall - f1 tags: - text-classification --- # T5-base fine-tuned for Sentiment Analysis 👍👎 [Google's T5](https://ai.googleblog.com/2020/02/exploring-transfer-learning-with-t5.html) base fine-tuned on [SST-2](https://huggingface.co/datasets/st2) dataset for **Sentiment Analysis** downstream task. ## Details of T5 The **T5** model was presented in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/pdf/1910.10683.pdf) by *Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu* ## Model fine-tuning 🏋️‍ The model has been finetuned for 10 epochs on standard hyperparameters ## Val set metrics 🧾 |precision | recall | f1-score |support| |----------|----------|---------|----------|-------| |negative | 0.95 | 0.95| 0.95| 428 | |positive | 0.94 | 0.96| 0.95| 444 | |----------|----------|---------|----------|-------| |accuracy| | | 0.95| 872 | |macro avg| 0.95| 0.95| 0.95| 872 | |weighted avg| 0.95| 0.95| 0.95 | 872 | ## Model in Action 🚀 ```python from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("t5-finetune-sst2") model = T5ForConditionalGeneration.from_pretrained("t5-finetune-sst2") def get_sentiment(text): inputs = tokenizer("sentiment: " + text, max_length=128, truncation=True, return_tensors="pt").input_ids preds = model.generate(inputs) decoded_preds = tokenizer.batch_decode(sequences=preds, skip_special_tokens=True) return decoded_preds get_sentiment("This movie is awesome") # labels are 'p' for 'positive' and 'n' for 'negative' # Output: ['p'] ``` > This model card is based on "mrm8488/t5-base-finetuned-imdb-sentiment" by Manuel Romero/@mrm8488
1,986
[ [ -0.041351318359375, -0.02685546875, 0.015655517578125, 0.01995849609375, -0.037933349609375, -0.0005040168762207031, -0.0240020751953125, -0.01294708251953125, -0.008087158203125, 0.0179290771484375, -0.06231689453125, -0.06451416015625, -0.06683349609375, -...
timm/cspresnet50.ra_in1k
2023-04-12T20:39:54.000Z
[ "timm", "pytorch", "safetensors", "image-classification", "arxiv:2110.00476", "arxiv:1911.11929", "arxiv:1512.03385", "license:apache-2.0", "region:us" ]
image-classification
timm
null
null
timm/cspresnet50.ra_in1k
0
476
timm
2023-04-12T20:39:36
--- tags: - image-classification - timm library_tag: timm license: apache-2.0 --- # Model card for cspresnet50.ra_in1k A CSP-ResNet (Cross-Stage-Partial) image classification model. Trained on ImageNet-1k in `timm` using recipe template described below. Recipe details: * RandAugment `RA` recipe. Inspired by and evolved from EfficientNet RandAugment recipes. Published as `B` recipe in [ResNet Strikes Back](https://arxiv.org/abs/2110.00476). * RMSProp (TF 1.0 behaviour) optimizer, EMA weight averaging * Step (exponential decay w/ staircase) LR schedule with warmup ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 21.6 - GMACs: 4.5 - Activations (M): 11.5 - Image size: 256 x 256 - **Papers:** - CSPNet: A New Backbone that can Enhance Learning Capability of CNN: https://arxiv.org/abs/1911.11929 - Deep Residual Learning for Image Recognition: https://arxiv.org/abs/1512.03385 - 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('cspresnet50.ra_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( 'cspresnet50.ra_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, 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( 'cspresnet50.ra_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{Wang2019CSPNetAN, title={CSPNet: A New Backbone that can Enhance Learning Capability of CNN}, author={Chien-Yao Wang and Hong-Yuan Mark Liao and I-Hau Yeh and Yueh-Hua Wu and Ping-Yang Chen and Jun-Wei Hsieh}, journal={2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)}, year={2019}, pages={1571-1580} } ``` ```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 @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}} } ```
5,044
[ [ -0.03515625, -0.02001953125, -0.00748443603515625, 0.00612640380859375, -0.018157958984375, -0.01465606689453125, -0.0242767333984375, -0.0281524658203125, 0.017608642578125, 0.030517578125, -0.03436279296875, -0.04638671875, -0.05023193359375, -0.0068855285...
lmsys/longchat-7b-16k
2023-07-29T02:58:21.000Z
[ "transformers", "pytorch", "llama", "text-generation", "has_space", "text-generation-inference", "region:us" ]
text-generation
lmsys
null
null
lmsys/longchat-7b-16k
44
476
transformers
2023-06-28T17:28:53
--- inference: false --- # longchat-7b-16k Model Card Please use load_model from FastChat or LongChat repo to load the model (or chatting API from FastChat). There is a monkey patch needed to use the model. Usage referece: (LongChat) python3 eval.py --model-name-or-path lmsys/longchat-7b-16k --task topics (FastChat) python3 -m fastchat.serve.cli --model-path lmsys/longchat-7b-16k Under the hood, the monkey patch is added in: https://github.com/lm-sys/FastChat/blob/da0641e567cf93756b0978ab5a6b092e96f06240/fastchat/model/model_adapter.py#L429 ## Model details **Model type:** longchat-7b-16k is an open-source chatbot trained by fine-tuning llama-7b on user-shared conversations collected from ShareGPT, using the condensing rotary embedding technique reported in the [blog](https://lmsys.org/blog/2023-06-29-longchat). **Model date:** longchat-7b-16k was trained on June 2023. **Organizations developing the model:** The LongChat developers: Dacheng Li*, Rulin Shao*, Anze Xie, Ying Sheng, Lianmin Zheng, Ion Stoica, Xuezhe Ma, and Hao Zhang **Paper or resources for more information:** https://github.com/DachengLi1/LongChat **Where to send questions or comments about the model:** https://github.com/DachengLi1/LongChat ## Intended use **Primary intended uses:** The primary use of longchat-7b-16k is for research purposes. **Primary intended users:** The primary intended users of the model are researchers in natural language processing, machine learning, and artificial intelligence. ## Training dataset 80K conversations collected from ShareGPT.com. ## Evaluation dataset A preliminary evaluation of the model quality is conducted by our released [LongEval](https://github.com/DachengLi1/LongChat).
1,727
[ [ -0.0191650390625, -0.065673828125, 0.0288848876953125, 0.04180908203125, -0.033477783203125, -0.0026378631591796875, -0.0166473388671875, -0.059234619140625, 0.0178680419921875, 0.045806884765625, -0.0439453125, -0.0218505859375, -0.0210113525390625, 0.00026...
jbilcke-hf/sdxl-akira
2023-10-27T15:04:29.000Z
[ "diffusers", "stable-diffusion-xl", "stable-diffusion-xl-diffusers", "text-to-image", "lora", "dataset:jbilcke-hf/akira", "region:us", "has_space" ]
text-to-image
jbilcke-hf
null
null
jbilcke-hf/sdxl-akira
1
476
diffusers
2023-10-27T09:56:17
--- base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: akira-style tags: - stable-diffusion-xl - stable-diffusion-xl-diffusers - text-to-image - diffusers - lora inference: true datasets: - jbilcke-hf/akira --- # LoRA DreamBooth - jbilcke-hf/sdxl-akira These are LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0 trained on @fffiloni's SD-XL trainer. The weights were trained on the concept prompt: ``` akira-style ``` Use this keyword to trigger your custom model in your prompts. LoRA for the text encoder was enabled: False. Special VAE used for training: madebyollin/sdxl-vae-fp16-fix. ## Usage Make sure to upgrade diffusers to >= 0.19.0: ``` pip install diffusers --upgrade ``` In addition make sure to install transformers, safetensors, accelerate as well as the invisible watermark: ``` pip install invisible_watermark transformers accelerate safetensors ``` To just use the base model, you can run: ```python import torch from diffusers import DiffusionPipeline, AutoencoderKL device = "cuda" if torch.cuda.is_available() else "cpu" vae = AutoencoderKL.from_pretrained('madebyollin/sdxl-vae-fp16-fix', torch_dtype=torch.float16) pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True ) pipe.to(device) # This is where you load your trained weights specific_safetensors = "pytorch_lora_weights.safetensors" lora_scale = 0.9 pipe.load_lora_weights( 'jbilcke-hf/sdxl-akira', weight_name = specific_safetensors, # use_auth_token = True ) prompt = "A majestic akira-style jumping from a big stone at night" image = pipe( prompt=prompt, num_inference_steps=50, cross_attention_kwargs={"scale": lora_scale} ).images[0] ```
1,815
[ [ -0.01490020751953125, -0.029266357421875, 0.028656005859375, 0.01430511474609375, -0.0295867919921875, 0.0039520263671875, 0.0111236572265625, -0.01540374755859375, 0.046783447265625, 0.036407470703125, -0.03912353515625, -0.0298309326171875, -0.05975341796875, ...
bvanaken/CORe-clinical-outcome-biobert-v1
2021-05-19T13:34:58.000Z
[ "transformers", "pytorch", "jax", "bert", "medical", "clinical", "en", "endpoints_compatible", "region:us" ]
null
bvanaken
null
null
bvanaken/CORe-clinical-outcome-biobert-v1
8
475
transformers
2022-03-02T23:29:05
--- language: "en" tags: - bert - medical - clinical thumbnail: "https://core.app.datexis.com/static/paper.png" --- # CORe Model - BioBERT + Clinical Outcome Pre-Training ## Model description The CORe (_Clinical Outcome Representations_) model is introduced in the paper [Clinical Outcome Predictions from Admission Notes using Self-Supervised Knowledge Integration](https://www.aclweb.org/anthology/2021.eacl-main.75.pdf). It is based on BioBERT and further pre-trained on clinical notes, disease descriptions and medical articles with a specialised _Clinical Outcome Pre-Training_ objective. #### How to use CORe You can load the model via the transformers library: ``` from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("bvanaken/CORe-clinical-outcome-biobert-v1") model = AutoModel.from_pretrained("bvanaken/CORe-clinical-outcome-biobert-v1") ``` From there, you can fine-tune it on clinical tasks that benefit from patient outcome knowledge. ### Pre-Training Data The model is based on [BioBERT](https://huggingface.co/dmis-lab/biobert-v1.1) pre-trained on PubMed data. The _Clinical Outcome Pre-Training_ included discharge summaries from the MIMIC III training set (specified [here](https://github.com/bvanaken/clinical-outcome-prediction/blob/master/tasks/mimic_train.csv)), medical transcriptions from [MTSamples](https://mtsamples.com/) and clinical notes from the i2b2 challenges 2006-2012. It further includes ~10k case reports from PubMed Central (PMC), disease articles from Wikipedia and article sections from the [MedQuAd](https://github.com/abachaa/MedQuAD) dataset extracted from NIH websites. ### More Information For all the details about CORe and contact info, please visit [CORe.app.datexis.com](http://core.app.datexis.com/). ### Cite ```bibtex @inproceedings{vanaken21, author = {Betty van Aken and Jens-Michalis Papaioannou and Manuel Mayrdorfer and Klemens Budde and Felix A. Gers and Alexander Löser}, title = {Clinical Outcome Prediction from Admission Notes using Self-Supervised Knowledge Integration}, booktitle = {Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, {EACL} 2021, Online, April 19 - 23, 2021}, publisher = {Association for Computational Linguistics}, year = {2021}, } ```
2,483
[ [ -0.0057373046875, -0.0267181396484375, 0.0594482421875, 0.004852294921875, -0.0015459060668945312, 0.005893707275390625, -0.0003268718719482422, -0.0217132568359375, 0.0265655517578125, 0.042388916015625, -0.0401611328125, -0.061187744140625, -0.052581787109375,...
freedomking/mc-bert
2022-07-15T10:14:00.000Z
[ "transformers", "pytorch", "endpoints_compatible", "region:us" ]
null
freedomking
null
null
freedomking/mc-bert
3
475
transformers
2022-07-15T10:04:34
MC-BERT is a novel conceptualized representation learning approach for the medical domain. First, we use a different mask generation procedure to mask spans of tokens, rather than only random ones. We also introduce two kinds of masking strategies, namely whole entity masking and whole span masking. Finally, MC-BERT split the input document into segments based on the actual "sentences" provided by the user as positive samples and sample random sentences from other documents as negative samples for the next sentence prediction. ![](https://github.com/alibaba-research/ChineseBLUE/raw/master/figs/c_bert_model.jpg) More detail: https://github.com/alibaba-research/ChineseBLUE
682
[ [ -0.04693603515625, -0.0633544921875, 0.048797607421875, 0.005023956298828125, -0.03271484375, 0.01485443115234375, -0.0019197463989257812, -0.044158935546875, 0.055145263671875, 0.03460693359375, -0.052947998046875, -0.034088134765625, -0.0391845703125, -0.0...
team-lucid/deberta-v3-base-korean
2023-08-01T17:38:53.000Z
[ "transformers", "pytorch", "jax", "rust", "safetensors", "deberta-v2", "deberta-v3", "ko", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
team-lucid
null
null
team-lucid/deberta-v3-base-korean
2
475
transformers
2023-06-30T02:06:36
--- license: apache-2.0 language: - ko tags: - deberta-v3 --- # deberta-v3-base-korean ## Model Details DeBERTa는 Disentangled Attention과 Enhanced Masked Language Model을 통해 BERT의 성능을 향상시킨 모델입니다. 그중 DeBERTa V3은 ELECTRA-Style Pre-Training에 Gradient-Disentangled Embedding Sharing을 적용사여 DeBERTA를 개선했습니다. 이 연구는 구글의 TPU Research Cloud(TRC)를 통해 지원받은 Cloud TPU로 학습되었습니다. ## How to Get Started with the Model ```python from transformers import AutoTokenizer, DebertaV2ForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("team-lucid/deberta-v3-base-korean") model = DebertaV2ForSequenceClassification.from_pretrained("team-lucid/deberta-v3-base-korean") inputs = tokenizer("안녕, 세상!", return_tensors="pt") outputs = model(**inputs) ``` ## Evaluation | | Backbone<br/>Parameters(M) | **NSMC**<br/>(acc) | **PAWS**<br/>(acc) | **KorNLI**<br/>(acc) | **KorSTS**<br/>(spearman) | **Question Pair**<br/>(acc) | |:-------------------|:--------------------------:|:------------------:|:------------------:|:--------------------:|:-------------------------:|:---------------------------:| | DistilKoBERT | 22M | 88.41 | 62.55 | 70.55 | 73.21 | 92.48 | | KoBERT | 85M | 89.63 | 80.65 | 79.00 | 79.64 | 93.93 | | XLM-Roberta-Base | 85M | 89.49 | 82.95 | 79.92 | 79.09 | 93.53 | | KcBERT-Base | 85M | 89.62 | 66.95 | 74.85 | 75.57 | 93.93 | | KcBERT-Large | 302M | 90.68 | 70.15 | 76.99 | 77.49 | 94.06 | | KoELECTRA-Small-v3 | 9.4M | 89.36 | 77.45 | 78.60 | 80.79 | 94.85 | | KoELECTRA-Base-v3 | 85M | 90.63 | 84.45 | 82.24 | **85.53** | 95.25 | | Ours | | | | | | | | DeBERTa-xsmall | 22M | 91.21 | 84.40 | 82.13 | 83.90 | 95.38 | | DeBERTa-small | 43M | **91.34** | 83.90 | 81.61 | 82.97 | 94.98 | | DeBERTa-base | 86M | 91.22 | **85.5** | **82.81** | 84.46 | **95.77** | \* 다른 모델의 결과는 [KcBERT-Finetune](https://github.com/Beomi/KcBERT-Finetune) 과 [KoELECTRA](https://github.com/monologg/KoELECTRA)를 참고했으며, Hyperparameter 역시 다른 모델과 유사하게 설정습니다.
3,233
[ [ -0.046173095703125, -0.050506591796875, 0.0254058837890625, 0.026031494140625, -0.030975341796875, 0.0213470458984375, 0.004619598388671875, -0.0106201171875, 0.0440673828125, 0.024200439453125, -0.036834716796875, -0.05706787109375, -0.06396484375, -0.01256...
badmonk/elxpb
2023-07-15T12:24:02.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
badmonk
null
null
badmonk/elxpb
1
475
diffusers
2023-07-15T12:21:28
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- # Model Card for ELXPB ## Model Description - **Developed by:** BADMONK - **Model type:** Dreambooth Model + Extracted LoRA - **Language(s) (NLP):** EN - **License:** Creativeml-Openrail-M - **Parent Model:** ChilloutMix # How to Get Started with the Model Use the code below to get started with the model. ### ELXPB ###
427
[ [ -0.024810791015625, -0.033447265625, 0.0236968994140625, 0.0264739990234375, -0.05499267578125, 0.00508880615234375, 0.032470703125, -0.033599853515625, 0.042633056640625, 0.0550537109375, -0.051025390625, -0.053497314453125, -0.034454345703125, -0.030380249...
OPERFIND/step2
2023-07-21T16:34:52.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
OPERFIND
null
null
OPERFIND/step2
0
475
diffusers
2023-07-20T18:19:04
--- license: creativeml-openrail-m tags: - text-to-image - stable-diffusion --- ### step2 Dreambooth model trained by OPERFIND with [TheLastBen's fast-DreamBooth](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb) notebook Test the concept via A1111 Colab [fast-Colab-A1111](https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Sample pictures of this concept:
495
[ [ -0.022613525390625, -0.063720703125, 0.041229248046875, 0.029205322265625, -0.022430419921875, 0.022796630859375, 0.0286865234375, -0.023345947265625, 0.0382080078125, 0.01470947265625, -0.017486572265625, -0.0163421630859375, -0.0308837890625, -0.0191192626...
flax-sentence-embeddings/all_datasets_v3_roberta-large
2021-07-23T15:45:17.000Z
[ "sentence-transformers", "pytorch", "roberta", "feature-extraction", "sentence-similarity", "en", "arxiv:2104.08727", "arxiv:1810.09305", "arxiv:2102.07033", "arxiv:1904.06472", "endpoints_compatible", "region:us" ]
sentence-similarity
flax-sentence-embeddings
null
null
flax-sentence-embeddings/all_datasets_v3_roberta-large
12
474
sentence-transformers
2022-03-02T23:29:05
--- pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity language: en --- # Model description The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We used the pretrained [`roberta-large`](https://huggingface.co/roberta-large) model and fine-tuned in on a 1B sentence pairs dataset. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset. We developped this model during the [Community week using JAX/Flax for NLP & CV](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104), organized by Hugging Face. We developped this model as part of the project: [Train the Best Sentence Embedding Model Ever with 1B Training Pairs](https://discuss.huggingface.co/t/train-the-best-sentence-embedding-model-ever-with-1b-training-pairs/7354). We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Google’s Flax, JAX, and Cloud team member about efficient deep learning frameworks. ## Intended uses Our model is intented to be used as a sentence encoder. Given an input sentence, it ouptuts a vector which captures the sentence semantic information. The sentence vector may be used for information retrieval, clustering or sentence similarity tasks. ## How to use Here is how to use this model to get the features of a given text using [SentenceTransformers](https://github.com/UKPLab/sentence-transformers) library: ```python from sentence_transformers import SentenceTransformer model = SentenceTransformer('flax-sentence-embeddings/all_datasets_v3_roberta-large') text = "Replace me by any text you'd like." text_embbedding = model.encode(text) # array([-0.01559514, 0.04046123, 0.1317083 , 0.00085931, 0.04585106, # -0.05607086, 0.0138078 , 0.03569756, 0.01420381, 0.04266302 ...], # dtype=float32) ``` # Training procedure ## Pre-training We use the pretrained [`roberta-large`](https://huggingface.co/roberta-large). Please refer to the model card for more detailed information about the pre-training procedure. ## Fine-tuning We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss by comparing with true pairs. ### Hyper parameters We trained ou model on a TPU v3-8. We train the model during 540k steps using a batch size of 1024 (128 per TPU core). We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with a 2e-5 learning rate. The full training script is accessible in this current repository. ### Training data We use the concatenation from multiple datasets to fine-tune our model. The total number of sentence pairs is above 1 billion sentences. We sampled each dataset given a weighted probability which configuration is detailed in the `data_config.json` file. | Dataset | Paper | Number of training tuples | |:--------------------------------------------------------:|:----------------------------------------:|:--------------------------:| | [GOOAQ: Open Question Answering with Diverse Answer Types](https://github.com/allenai/gooaq) | [paper](https://arxiv.org/pdf/2104.08727.pdf) | 3,012,496 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_title_body_jsonl) | - | 364,001 | | [Flickr 30k](https://shannon.cs.illinois.edu/DenotationGraph/) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/229/33) | 317,695 | | [COCO 2020](COCO 2020) | [paper](https://link.springer.com/chapter/10.1007%2F978-3-319-10602-1_48) | 828,395| | [Code Search](https://huggingface.co/datasets/code_search_net) | - | 1,151,414 | | [TriviaqQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 | | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 | | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 | | [Simple Wikipedia](https://cs.pomona.edu/~dkauchak/simplification/) | [paper](https://www.aclweb.org/anthology/P11-2117/) | 102,225 | | [Quora Question Pairs](https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs) | - | 103,663 | | [Altlex](https://github.com/chridey/altlex/) | [paper](https://aclanthology.org/P16-1135.pdf) | 112,696 | | [Wikihow](https://github.com/pvl/wikihow_pairs_dataset) | [paper](https://arxiv.org/abs/1810.09305) | 128,542 | | [Sentence Compression](https://github.com/google-research-datasets/sentence-compression) | [paper](https://www.aclweb.org/anthology/D13-1155/) | 180,000 | | AllNLI ([SNLI](https://nlp.stanford.edu/projects/snli/) and [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) | [paper SNLI](https://doi.org/10.18653/v1/d15-1075), [paper MultiNLI](https://doi.org/10.18653/v1/n18-1101) | 277,230 | | [Eli5](https://huggingface.co/datasets/eli5) | [paper](https://doi.org/10.18653/v1/p19-1346) | 325,475 | | [SPECTER](https://github.com/allenai/specter) | [paper](https://doi.org/10.18653/v1/2020.acl-main.207) | 684,100 | | [S2ORC](https://github.com/allenai/s2orc) Title/Abstract | [paper](https://aclanthology.org/2020.acl-main.447/) | 41,769,185 | | [S2ORC](https://github.com/allenai/s2orc) Citation/Citation | [paper](https://aclanthology.org/2020.acl-main.447/) | 52,603,982 | | [S2ORC](https://github.com/allenai/s2orc) Citation/Abstract | [paper](https://aclanthology.org/2020.acl-main.447/) | 116,288,806 | | [PAQ](https://github.com/facebookresearch/PAQ) | [paper](https://arxiv.org/abs/2102.07033) | 64,371,441 | | [WikiAnswers](https://github.com/afader/oqa#wikianswers-corpus) | [paper](https://doi.org/10.1145/2623330.2623677) | 77,427,422 | | SearchQA | - | 582,261 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) Title/Answer | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 1,198,260 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) Title/Question | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 659,896 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) Question/Answer | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 681,164 | | [MS MARCO](https://microsoft.github.io/msmarco/) | [paper](https://doi.org/10.1145/3404835.3462804) | 9,144,553 | | [Reddit conversationnal](https://github.com/PolyAI-LDN/conversational-datasets/tree/master/reddit) | [paper](https://arxiv.org/abs/1904.06472) | 726,484,430 | | total | | 1,097,953,922 |
7,121
[ [ -0.0308074951171875, -0.059783935546875, 0.025421142578125, -0.0016260147094726562, -0.0003044605255126953, -0.01007843017578125, -0.022369384765625, -0.031646728515625, 0.03729248046875, 0.0206756591796875, -0.038116455078125, -0.042724609375, -0.03872680664062...
keremberke/yolov5n-clash-of-clans
2022-12-30T20:48:04.000Z
[ "yolov5", "tensorboard", "yolo", "vision", "object-detection", "pytorch", "dataset:keremberke/clash-of-clans-object-detection", "model-index", "has_space", "region:us" ]
object-detection
keremberke
null
null
keremberke/yolov5n-clash-of-clans
1
474
yolov5
2022-12-30T06:17:43
--- tags: - yolov5 - yolo - vision - object-detection - pytorch library_name: yolov5 library_version: 7.0.6 inference: false datasets: - keremberke/clash-of-clans-object-detection model-index: - name: keremberke/yolov5n-clash-of-clans results: - task: type: object-detection dataset: type: keremberke/clash-of-clans-object-detection name: keremberke/clash-of-clans-object-detection split: validation metrics: - type: precision # since mAP@0.5 is not available on hf.co/metrics value: 0.6771474810723029 # min: 0.0 - max: 1.0 name: mAP@0.5 --- <div align="center"> <img width="640" alt="keremberke/yolov5n-clash-of-clans" src="https://huggingface.co/keremberke/yolov5n-clash-of-clans/resolve/main/sample_visuals.jpg"> </div> ### How to use - Install [yolov5](https://github.com/fcakyon/yolov5-pip): ```bash pip install -U yolov5 ``` - Load model and perform prediction: ```python import yolov5 # load model model = yolov5.load('keremberke/yolov5n-clash-of-clans') # set model parameters model.conf = 0.25 # NMS confidence threshold model.iou = 0.45 # NMS IoU threshold model.agnostic = False # NMS class-agnostic model.multi_label = False # NMS multiple labels per box model.max_det = 1000 # maximum number of detections per image # set image img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' # perform inference results = model(img, size=640) # inference with test time augmentation results = model(img, augment=True) # parse results predictions = results.pred[0] boxes = predictions[:, :4] # x1, y1, x2, y2 scores = predictions[:, 4] categories = predictions[:, 5] # show detection bounding boxes on image results.show() # save results into "results/" folder results.save(save_dir='results/') ``` - Finetune the model on your custom dataset: ```bash yolov5 train --data data.yaml --img 640 --batch 16 --weights keremberke/yolov5n-clash-of-clans --epochs 10 ``` **More models available at: [awesome-yolov5-models](https://github.com/keremberke/awesome-yolov5-models)**
2,090
[ [ -0.05419921875, -0.0390625, 0.0184783935546875, -0.022552490234375, -0.021453857421875, -0.0077972412109375, 0.0117645263671875, -0.04180908203125, 0.018310546875, 0.0243988037109375, -0.053741455078125, -0.055908203125, -0.04705810546875, -0.008468627929687...
facebook/detr-resnet-101-panoptic
2023-09-06T19:14:28.000Z
[ "transformers", "pytorch", "safetensors", "detr", "image-segmentation", "vision", "dataset:coco", "arxiv:2005.12872", "license:apache-2.0", "endpoints_compatible", "region:us" ]
image-segmentation
facebook
null
null
facebook/detr-resnet-101-panoptic
9
473
transformers
2022-03-02T23:29:05
--- license: apache-2.0 tags: - image-segmentation - vision datasets: - coco widget: - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/dog-cat.jpg example_title: Dog & Cat - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/construction-site.jpg example_title: Construction Site - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/apple-orange.jpg example_title: Apple & Orange --- # DETR (End-to-End Object Detection) model with ResNet-101 backbone DEtection TRansformer (DETR) model trained end-to-end on COCO 2017 panoptic (118k annotated images). It was introduced in the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Carion et al. and first released in [this repository](https://github.com/facebookresearch/detr). Disclaimer: The team releasing DETR did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The DETR model is an encoder-decoder transformer with a convolutional backbone. Two heads are added on top of the decoder outputs in order to perform object detection: a linear layer for the class labels and a MLP (multi-layer perceptron) for the bounding boxes. The model uses so-called object queries to detect objects in an image. Each object query looks for a particular object in the image. For COCO, the number of object queries is set to 100. The model is trained using a "bipartite matching loss": one compares the predicted classes + bounding boxes of each of the N = 100 object queries to the ground truth annotations, padded up to the same length N (so if an image only contains 4 objects, 96 annotations will just have a "no object" as class and "no bounding box" as bounding box). The Hungarian matching algorithm is used to create an optimal one-to-one mapping between each of the N queries and each of the N annotations. Next, standard cross-entropy (for the classes) and a linear combination of the L1 and generalized IoU loss (for the bounding boxes) are used to optimize the parameters of the model. DETR can be naturally extended to perform panoptic segmentation, by adding a mask head on top of the decoder outputs. ## Intended uses & limitations You can use the raw model for panoptic segmentation. See the [model hub](https://huggingface.co/models?search=facebook/detr) to look for all available DETR models. ### How to use Here is how to use this model: ```python from transformers import DetrFeatureExtractor, DetrForSegmentation from PIL import Image import requests url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) feature_extractor = DetrFeatureExtractor.from_pretrained('facebook/detr-resnet-101-panoptic') model = DetrForSegmentation.from_pretrained('facebook/detr-resnet-101-panoptic') # prepare inputs for the model inputs = feature_extractor(images=image, return_tensors="pt") # forward pass outputs = model(**inputs) # use the `post_process_panoptic` method of `DetrFeatureExtractor` to convert to COCO format processed_sizes = torch.as_tensor(inputs["pixel_values"].shape[-2:]).unsqueeze(0) result = feature_extractor.post_process_panoptic(outputs, processed_sizes)[0] # the segmentation is stored in a special-format png panoptic_seg = Image.open(io.BytesIO(result["png_string"])) panoptic_seg = numpy.array(panoptic_seg, dtype=numpy.uint8) # retrieve the ids corresponding to each mask panoptic_seg_id = rgb_to_id(panoptic_seg) ``` Currently, both the feature extractor and model support PyTorch. ## Training data The DETR model was trained on [COCO 2017 panoptic](https://cocodataset.org/#download), a dataset consisting of 118k/5k annotated images for training/validation respectively. ## Training procedure ### Preprocessing The exact details of preprocessing of images during training/validation can be found [here](https://github.com/facebookresearch/detr/blob/master/datasets/coco_panoptic.py). Images are resized/rescaled such that the shortest side is at least 800 pixels and the largest side at most 1333 pixels, and normalized across the RGB channels with the ImageNet mean (0.485, 0.456, 0.406) and standard deviation (0.229, 0.224, 0.225). ### Training The model was trained for 300 epochs on 16 V100 GPUs. This takes 3 days, with 4 images per GPU (hence a total batch size of 64). ## Evaluation results This model achieves the following results on COCO 2017 validation: a box AP (average precision) of **40.1**, a segmentation AP (average precision) of **33** and a PQ (panoptic quality) of **45.1**. For more details regarding evaluation results, we refer to table 5 of the original paper. ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2005-12872, author = {Nicolas Carion and Francisco Massa and Gabriel Synnaeve and Nicolas Usunier and Alexander Kirillov and Sergey Zagoruyko}, title = {End-to-End Object Detection with Transformers}, journal = {CoRR}, volume = {abs/2005.12872}, year = {2020}, url = {https://arxiv.org/abs/2005.12872}, archivePrefix = {arXiv}, eprint = {2005.12872}, timestamp = {Thu, 28 May 2020 17:38:09 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-2005-12872.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
5,481
[ [ -0.06781005859375, -0.055389404296875, -0.00563812255859375, 0.01024627685546875, -0.023590087890625, -0.01009368896484375, -0.008514404296875, -0.059051513671875, 0.0208740234375, 0.043731689453125, -0.04931640625, -0.03558349609375, -0.040130615234375, 0.0...
ai-forever/ruT5-large
2023-11-03T12:49:46.000Z
[ "transformers", "pytorch", "t5", "text2text-generation", "PyTorch", "Transformers", "ru", "arxiv:2309.10931", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
ai-forever
null
null
ai-forever/ruT5-large
24
473
transformers
2022-03-02T23:29:05
--- language: - ru tags: - PyTorch - Transformers thumbnail: "https://github.com/sberbank-ai/model-zoo" --- # ruT5-large The model architecture design, pretraining, and evaluation are documented in our preprint: [**A Family of Pretrained Transformer Language Models for Russian**](https://arxiv.org/abs/2309.10931). The model was trained by the [SberDevices](https://sberdevices.ru/). * Task: `text2text generation` * Type: `encoder-decoder` * Tokenizer: `bpe` * Dict size: `32 101 ` * Num Parameters: `737 M` * Training Data Volume `300 GB` # Authors + NLP core team RnD [Telegram channel](https://t.me/nlpcoreteam): + Dmitry Zmitrovich # Cite us ``` @misc{zmitrovich2023family, title={A Family of Pretrained Transformer Language Models for Russian}, author={Dmitry Zmitrovich and Alexander Abramov and Andrey Kalmykov and Maria Tikhonova and Ekaterina Taktasheva and Danil Astafurov and Mark Baushenko and Artem Snegirev and Tatiana Shavrina and Sergey Markov and Vladislav Mikhailov and Alena Fenogenova}, year={2023}, eprint={2309.10931}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
1,138
[ [ -0.01522064208984375, -0.0119476318359375, 0.023162841796875, 0.0221710205078125, -0.032379150390625, -0.0161895751953125, -0.0207672119140625, -0.0228271484375, -0.022735595703125, 0.021331787109375, -0.03759765625, -0.025665283203125, -0.046478271484375, 0...
philschmid/clip-zero-shot-image-classification
2023-06-02T06:36:10.000Z
[ "generic", "pytorch", "clip", "vision", "zero-shot-image-classification", "endpoints-template", "endpoints_compatible", "has_space", "region:us" ]
zero-shot-image-classification
philschmid
null
null
philschmid/clip-zero-shot-image-classification
13
473
generic
2022-08-10T11:57:55
--- tags: - vision - zero-shot-image-classification - endpoints-template library_name: generic --- # Fork of [openai/clip-vit-base-patch32](https://huggingface.co/openai/clip-vit-base-patch32) for a `zero-sho-image-classification` Inference endpoint. This repository implements a `custom` task for `zero-shot-image-classification` for 🤗 Inference Endpoints. The code for the customized pipeline is in the [pipeline.py](https://huggingface.co/philschmid/clip-zero-shot-image-classification/blob/main/pipeline.py). To use deploy this model a an Inference Endpoint you have to select `Custom` as task to use the `pipeline.py` file. -> _double check if it is selected_ ### expected Request payload ```json { "image": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgICAgMC....", // base64 image as bytes "candiates":["sea","palace","car","ship"] } ``` below is an example on how to run a request using Python and `requests`. ## Run Request 1. prepare an image. ```bash !wget https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg ``` 2. run request ```python import json from typing import List import requests as r import base64 ENDPOINT_URL = "" HF_TOKEN = "" def predict(path_to_image: str = None, candiates: List[str] = None): with open(path_to_image, "rb") as i: b64 = base64.b64encode(i.read()) payload = {"inputs": {"image": b64.decode("utf-8"), "candiates": candiates}} response = r.post( ENDPOINT_URL, headers={"Authorization": f"Bearer {HF_TOKEN}"}, json=payload ) return response.json() prediction = predict( path_to_image="palace.jpg", candiates=["sea", "palace", "car", "ship"] ) ``` expected output ```python [{'label': 'palace', 'score': 0.9996134638786316}, {'label': 'car', 'score': 0.0002602009626571089}, {'label': 'ship', 'score': 0.00011758189066313207}, {'label': 'sea', 'score': 8.666840585647151e-06}] ```
1,908
[ [ -0.036407470703125, -0.0443115234375, 0.0207672119140625, -0.0030422210693359375, -0.0286712646484375, -0.01000213623046875, -0.00458526611328125, -0.0322265625, 0.043853759765625, 0.039947509765625, -0.04327392578125, -0.038421630859375, -0.051025390625, -0...
timm/regnety_120.sw_in12k_ft_in1k
2023-03-21T06:42:25.000Z
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "dataset:imagenet-12k", "arxiv:2003.13678", "license:apache-2.0", "region:us" ]
image-classification
timm
null
null
timm/regnety_120.sw_in12k_ft_in1k
0
473
timm
2023-03-21T06:42:02
--- tags: - image-classification - timm library_tag: timm license: apache-2.0 datasets: - imagenet-1k - imagenet-12k --- # Model card for regnety_120.sw_in12k_ft_in1k A RegNetY-12GF image classification model. Pretrained on ImageNet-12k and fine-tuned on ImageNet-1k by Ross Wightman in `timm`. The `timm` RegNet implementation includes a number of enhancements not present in other implementations, including: * stochastic depth * gradient checkpointing * layer-wise LR decay * configurable output stride (dilation) * configurable activation and norm layers * option for a pre-activation bottleneck block used in RegNetV variant * only known RegNetZ model definitions with pretrained weights ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 51.8 - GMACs: 12.1 - Activations (M): 21.4 - Image size: train = 224 x 224, test = 288 x 288 - **Papers:** - Designing Network Design Spaces: https://arxiv.org/abs/2003.13678 - **Original:** https://github.com/huggingface/pytorch-image-models - **Dataset:** ImageNet-1k - **Pretrain Dataset:** ImageNet-12k ## 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('regnety_120.sw_in12k_ft_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( 'regnety_120.sw_in12k_ft_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, 112, 112]) # torch.Size([1, 224, 56, 56]) # torch.Size([1, 448, 28, 28]) # torch.Size([1, 896, 14, 14]) # torch.Size([1, 2240, 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( 'regnety_120.sw_in12k_ft_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, 2240, 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). For the comparison summary below, the ra_in1k, ra3_in1k, ch_in1k, sw_*, and lion_* tagged weights are trained in `timm`. |model |img_size|top1 |top5 |param_count|gmacs|macts | |-------------------------|--------|------|------|-----------|-----|------| |[regnety_1280.swag_ft_in1k](https://huggingface.co/timm/regnety_1280.swag_ft_in1k)|384 |88.228|98.684|644.81 |374.99|210.2 | |[regnety_320.swag_ft_in1k](https://huggingface.co/timm/regnety_320.swag_ft_in1k)|384 |86.84 |98.364|145.05 |95.0 |88.87 | |[regnety_160.swag_ft_in1k](https://huggingface.co/timm/regnety_160.swag_ft_in1k)|384 |86.024|98.05 |83.59 |46.87|67.67 | |[regnety_160.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.sw_in12k_ft_in1k)|288 |86.004|97.83 |83.59 |26.37|38.07 | |[regnety_1280.swag_lc_in1k](https://huggingface.co/timm/regnety_1280.swag_lc_in1k)|224 |85.996|97.848|644.81 |127.66|71.58 | |[regnety_160.lion_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.lion_in12k_ft_in1k)|288 |85.982|97.844|83.59 |26.37|38.07 | |[regnety_160.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.sw_in12k_ft_in1k)|224 |85.574|97.666|83.59 |15.96|23.04 | |[regnety_160.lion_in12k_ft_in1k](https://huggingface.co/timm/regnety_160.lion_in12k_ft_in1k)|224 |85.564|97.674|83.59 |15.96|23.04 | |[regnety_120.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_120.sw_in12k_ft_in1k)|288 |85.398|97.584|51.82 |20.06|35.34 | |[regnety_2560.seer_ft_in1k](https://huggingface.co/timm/regnety_2560.seer_ft_in1k)|384 |85.15 |97.436|1282.6 |747.83|296.49| |[regnetz_e8.ra3_in1k](https://huggingface.co/timm/regnetz_e8.ra3_in1k)|320 |85.036|97.268|57.7 |15.46|63.94 | |[regnety_120.sw_in12k_ft_in1k](https://huggingface.co/timm/regnety_120.sw_in12k_ft_in1k)|224 |84.976|97.416|51.82 |12.14|21.38 | |[regnety_320.swag_lc_in1k](https://huggingface.co/timm/regnety_320.swag_lc_in1k)|224 |84.56 |97.446|145.05 |32.34|30.26 | |[regnetz_040_h.ra3_in1k](https://huggingface.co/timm/regnetz_040_h.ra3_in1k)|320 |84.496|97.004|28.94 |6.43 |37.94 | |[regnetz_e8.ra3_in1k](https://huggingface.co/timm/regnetz_e8.ra3_in1k)|256 |84.436|97.02 |57.7 |9.91 |40.94 | |[regnety_1280.seer_ft_in1k](https://huggingface.co/timm/regnety_1280.seer_ft_in1k)|384 |84.432|97.092|644.81 |374.99|210.2 | |[regnetz_040.ra3_in1k](https://huggingface.co/timm/regnetz_040.ra3_in1k)|320 |84.246|96.93 |27.12 |6.35 |37.78 | |[regnetz_d8.ra3_in1k](https://huggingface.co/timm/regnetz_d8.ra3_in1k)|320 |84.054|96.992|23.37 |6.19 |37.08 | |[regnetz_d8_evos.ch_in1k](https://huggingface.co/timm/regnetz_d8_evos.ch_in1k)|320 |84.038|96.992|23.46 |7.03 |38.92 | |[regnetz_d32.ra3_in1k](https://huggingface.co/timm/regnetz_d32.ra3_in1k)|320 |84.022|96.866|27.58 |9.33 |37.08 | |[regnety_080.ra3_in1k](https://huggingface.co/timm/regnety_080.ra3_in1k)|288 |83.932|96.888|39.18 |13.22|29.69 | |[regnety_640.seer_ft_in1k](https://huggingface.co/timm/regnety_640.seer_ft_in1k)|384 |83.912|96.924|281.38 |188.47|124.83| |[regnety_160.swag_lc_in1k](https://huggingface.co/timm/regnety_160.swag_lc_in1k)|224 |83.778|97.286|83.59 |15.96|23.04 | |[regnetz_040_h.ra3_in1k](https://huggingface.co/timm/regnetz_040_h.ra3_in1k)|256 |83.776|96.704|28.94 |4.12 |24.29 | |[regnetv_064.ra3_in1k](https://huggingface.co/timm/regnetv_064.ra3_in1k)|288 |83.72 |96.75 |30.58 |10.55|27.11 | |[regnety_064.ra3_in1k](https://huggingface.co/timm/regnety_064.ra3_in1k)|288 |83.718|96.724|30.58 |10.56|27.11 | |[regnety_160.deit_in1k](https://huggingface.co/timm/regnety_160.deit_in1k)|288 |83.69 |96.778|83.59 |26.37|38.07 | |[regnetz_040.ra3_in1k](https://huggingface.co/timm/regnetz_040.ra3_in1k)|256 |83.62 |96.704|27.12 |4.06 |24.19 | |[regnetz_d8.ra3_in1k](https://huggingface.co/timm/regnetz_d8.ra3_in1k)|256 |83.438|96.776|23.37 |3.97 |23.74 | |[regnetz_d32.ra3_in1k](https://huggingface.co/timm/regnetz_d32.ra3_in1k)|256 |83.424|96.632|27.58 |5.98 |23.74 | |[regnetz_d8_evos.ch_in1k](https://huggingface.co/timm/regnetz_d8_evos.ch_in1k)|256 |83.36 |96.636|23.46 |4.5 |24.92 | |[regnety_320.seer_ft_in1k](https://huggingface.co/timm/regnety_320.seer_ft_in1k)|384 |83.35 |96.71 |145.05 |95.0 |88.87 | |[regnetv_040.ra3_in1k](https://huggingface.co/timm/regnetv_040.ra3_in1k)|288 |83.204|96.66 |20.64 |6.6 |20.3 | |[regnety_320.tv2_in1k](https://huggingface.co/timm/regnety_320.tv2_in1k)|224 |83.162|96.42 |145.05 |32.34|30.26 | |[regnety_080.ra3_in1k](https://huggingface.co/timm/regnety_080.ra3_in1k)|224 |83.16 |96.486|39.18 |8.0 |17.97 | |[regnetv_064.ra3_in1k](https://huggingface.co/timm/regnetv_064.ra3_in1k)|224 |83.108|96.458|30.58 |6.39 |16.41 | |[regnety_040.ra3_in1k](https://huggingface.co/timm/regnety_040.ra3_in1k)|288 |83.044|96.5 |20.65 |6.61 |20.3 | |[regnety_064.ra3_in1k](https://huggingface.co/timm/regnety_064.ra3_in1k)|224 |83.02 |96.292|30.58 |6.39 |16.41 | |[regnety_160.deit_in1k](https://huggingface.co/timm/regnety_160.deit_in1k)|224 |82.974|96.502|83.59 |15.96|23.04 | |[regnetx_320.tv2_in1k](https://huggingface.co/timm/regnetx_320.tv2_in1k)|224 |82.816|96.208|107.81 |31.81|36.3 | |[regnety_032.ra_in1k](https://huggingface.co/timm/regnety_032.ra_in1k)|288 |82.742|96.418|19.44 |5.29 |18.61 | |[regnety_160.tv2_in1k](https://huggingface.co/timm/regnety_160.tv2_in1k)|224 |82.634|96.22 |83.59 |15.96|23.04 | |[regnetz_c16_evos.ch_in1k](https://huggingface.co/timm/regnetz_c16_evos.ch_in1k)|320 |82.634|96.472|13.49 |3.86 |25.88 | |[regnety_080_tv.tv2_in1k](https://huggingface.co/timm/regnety_080_tv.tv2_in1k)|224 |82.592|96.246|39.38 |8.51 |19.73 | |[regnetx_160.tv2_in1k](https://huggingface.co/timm/regnetx_160.tv2_in1k)|224 |82.564|96.052|54.28 |15.99|25.52 | |[regnetz_c16.ra3_in1k](https://huggingface.co/timm/regnetz_c16.ra3_in1k)|320 |82.51 |96.358|13.46 |3.92 |25.88 | |[regnetv_040.ra3_in1k](https://huggingface.co/timm/regnetv_040.ra3_in1k)|224 |82.44 |96.198|20.64 |4.0 |12.29 | |[regnety_040.ra3_in1k](https://huggingface.co/timm/regnety_040.ra3_in1k)|224 |82.304|96.078|20.65 |4.0 |12.29 | |[regnetz_c16.ra3_in1k](https://huggingface.co/timm/regnetz_c16.ra3_in1k)|256 |82.16 |96.048|13.46 |2.51 |16.57 | |[regnetz_c16_evos.ch_in1k](https://huggingface.co/timm/regnetz_c16_evos.ch_in1k)|256 |81.936|96.15 |13.49 |2.48 |16.57 | |[regnety_032.ra_in1k](https://huggingface.co/timm/regnety_032.ra_in1k)|224 |81.924|95.988|19.44 |3.2 |11.26 | |[regnety_032.tv2_in1k](https://huggingface.co/timm/regnety_032.tv2_in1k)|224 |81.77 |95.842|19.44 |3.2 |11.26 | |[regnetx_080.tv2_in1k](https://huggingface.co/timm/regnetx_080.tv2_in1k)|224 |81.552|95.544|39.57 |8.02 |14.06 | |[regnetx_032.tv2_in1k](https://huggingface.co/timm/regnetx_032.tv2_in1k)|224 |80.924|95.27 |15.3 |3.2 |11.37 | |[regnety_320.pycls_in1k](https://huggingface.co/timm/regnety_320.pycls_in1k)|224 |80.804|95.246|145.05 |32.34|30.26 | |[regnetz_b16.ra3_in1k](https://huggingface.co/timm/regnetz_b16.ra3_in1k)|288 |80.712|95.47 |9.72 |2.39 |16.43 | |[regnety_016.tv2_in1k](https://huggingface.co/timm/regnety_016.tv2_in1k)|224 |80.66 |95.334|11.2 |1.63 |8.04 | |[regnety_120.pycls_in1k](https://huggingface.co/timm/regnety_120.pycls_in1k)|224 |80.37 |95.12 |51.82 |12.14|21.38 | |[regnety_160.pycls_in1k](https://huggingface.co/timm/regnety_160.pycls_in1k)|224 |80.288|94.964|83.59 |15.96|23.04 | |[regnetx_320.pycls_in1k](https://huggingface.co/timm/regnetx_320.pycls_in1k)|224 |80.246|95.01 |107.81 |31.81|36.3 | |[regnety_080.pycls_in1k](https://huggingface.co/timm/regnety_080.pycls_in1k)|224 |79.882|94.834|39.18 |8.0 |17.97 | |[regnetz_b16.ra3_in1k](https://huggingface.co/timm/regnetz_b16.ra3_in1k)|224 |79.872|94.974|9.72 |1.45 |9.95 | |[regnetx_160.pycls_in1k](https://huggingface.co/timm/regnetx_160.pycls_in1k)|224 |79.862|94.828|54.28 |15.99|25.52 | |[regnety_064.pycls_in1k](https://huggingface.co/timm/regnety_064.pycls_in1k)|224 |79.716|94.772|30.58 |6.39 |16.41 | |[regnetx_120.pycls_in1k](https://huggingface.co/timm/regnetx_120.pycls_in1k)|224 |79.592|94.738|46.11 |12.13|21.37 | |[regnetx_016.tv2_in1k](https://huggingface.co/timm/regnetx_016.tv2_in1k)|224 |79.44 |94.772|9.19 |1.62 |7.93 | |[regnety_040.pycls_in1k](https://huggingface.co/timm/regnety_040.pycls_in1k)|224 |79.23 |94.654|20.65 |4.0 |12.29 | |[regnetx_080.pycls_in1k](https://huggingface.co/timm/regnetx_080.pycls_in1k)|224 |79.198|94.55 |39.57 |8.02 |14.06 | |[regnetx_064.pycls_in1k](https://huggingface.co/timm/regnetx_064.pycls_in1k)|224 |79.064|94.454|26.21 |6.49 |16.37 | |[regnety_032.pycls_in1k](https://huggingface.co/timm/regnety_032.pycls_in1k)|224 |78.884|94.412|19.44 |3.2 |11.26 | |[regnety_008_tv.tv2_in1k](https://huggingface.co/timm/regnety_008_tv.tv2_in1k)|224 |78.654|94.388|6.43 |0.84 |5.42 | |[regnetx_040.pycls_in1k](https://huggingface.co/timm/regnetx_040.pycls_in1k)|224 |78.482|94.24 |22.12 |3.99 |12.2 | |[regnetx_032.pycls_in1k](https://huggingface.co/timm/regnetx_032.pycls_in1k)|224 |78.178|94.08 |15.3 |3.2 |11.37 | |[regnety_016.pycls_in1k](https://huggingface.co/timm/regnety_016.pycls_in1k)|224 |77.862|93.73 |11.2 |1.63 |8.04 | |[regnetx_008.tv2_in1k](https://huggingface.co/timm/regnetx_008.tv2_in1k)|224 |77.302|93.672|7.26 |0.81 |5.15 | |[regnetx_016.pycls_in1k](https://huggingface.co/timm/regnetx_016.pycls_in1k)|224 |76.908|93.418|9.19 |1.62 |7.93 | |[regnety_008.pycls_in1k](https://huggingface.co/timm/regnety_008.pycls_in1k)|224 |76.296|93.05 |6.26 |0.81 |5.25 | |[regnety_004.tv2_in1k](https://huggingface.co/timm/regnety_004.tv2_in1k)|224 |75.592|92.712|4.34 |0.41 |3.89 | |[regnety_006.pycls_in1k](https://huggingface.co/timm/regnety_006.pycls_in1k)|224 |75.244|92.518|6.06 |0.61 |4.33 | |[regnetx_008.pycls_in1k](https://huggingface.co/timm/regnetx_008.pycls_in1k)|224 |75.042|92.342|7.26 |0.81 |5.15 | |[regnetx_004_tv.tv2_in1k](https://huggingface.co/timm/regnetx_004_tv.tv2_in1k)|224 |74.57 |92.184|5.5 |0.42 |3.17 | |[regnety_004.pycls_in1k](https://huggingface.co/timm/regnety_004.pycls_in1k)|224 |74.018|91.764|4.34 |0.41 |3.89 | |[regnetx_006.pycls_in1k](https://huggingface.co/timm/regnetx_006.pycls_in1k)|224 |73.862|91.67 |6.2 |0.61 |3.98 | |[regnetx_004.pycls_in1k](https://huggingface.co/timm/regnetx_004.pycls_in1k)|224 |72.38 |90.832|5.16 |0.4 |3.14 | |[regnety_002.pycls_in1k](https://huggingface.co/timm/regnety_002.pycls_in1k)|224 |70.282|89.534|3.16 |0.2 |2.17 | |[regnetx_002.pycls_in1k](https://huggingface.co/timm/regnetx_002.pycls_in1k)|224 |68.752|88.556|2.68 |0.2 |2.16 | ## Citation ```bibtex @InProceedings{Radosavovic2020, title = {Designing Network Design Spaces}, author = {Ilija Radosavovic and Raj Prateek Kosaraju and Ross Girshick and Kaiming He and Piotr Doll{'a}r}, booktitle = {CVPR}, 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}} } ```
15,656
[ [ -0.060546875, -0.01763916015625, -0.01302337646484375, 0.03765869140625, -0.0322265625, -0.00827789306640625, -0.011810302734375, -0.039459228515625, 0.07470703125, 0.0052032470703125, -0.05169677734375, -0.03851318359375, -0.04840087890625, 0.00310707092285...
unikei/distilbert-base-re-punctuate
2023-09-13T09:01:41.000Z
[ "transformers", "pytorch", "distilbert", "token-classification", "biology", "medical", "en", "dataset:bigbio/drugprot", "dataset:bigbio/ncbi_disease", "license:bigscience-openrail-m", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
unikei
null
null
unikei/distilbert-base-re-punctuate
1
473
transformers
2023-08-17T12:28:13
--- license: bigscience-openrail-m widget: - text: >- the atm protein is a single high molecular weight protein predominantly confined to the nucleus of human fibroblasts but is present in both nuclear and microsomal fractions from human lymphoblast cells and peripheral blood lymphocytes atm protein levels and localization remain constant throughout all stages of the cell cycle truncated atm protein was not detected in lymphoblasts from ataxia telangiectasia patients homozygous for mutations leading to premature protein termination exposure of normal human cells to gamma irradiation and the radiomimetic drug neocarzinostatin had no effect on atm protein levels in contrast to a noted rise in p53 levels over the same time interval these findings are consistent with a role for the atm protein in ensuring the fidelity of dna repair and cell cycle regulation following genome damage datasets: - bigbio/drugprot - bigbio/ncbi_disease language: - en pipeline_tag: token-classification tags: - biology - medical --- # DistilBERT base model for restoring punctuation of medical/biotech speech-to-text transcripts E.g.: ``` the atm protein is a single high molecular weight protein predominantly confined to the nucleus of human fibroblasts but is present in both nuclear and microsomal fractions from human lymphoblast cells and peripheral blood lymphocytes atm protein levels and localization remain constant throughout all stages of the cell cycle truncated atm protein was not detected in lymphoblasts from ataxia telangiectasia patients homozygous for mutations leading to premature protein termination exposure of normal human cells to gamma irradiation and the radiomimetic drug neocarzinostatin had no effect on atm protein levels in contrast to a noted rise in p53 levels over the same time interval these findings are consistent with a role for the atm protein in ensuring the fidelity of dna repair and cell cycle regulation following genome damage ``` will be punctuated as follows: ``` The ATM protein is a single, high-molecular-weight protein predominantly confined to the nucleus of human fibroblasts, but is present in both nuclear and microsomal fractions from human lymphoblast cells and peripheral blood lymphocytes. ATM protein levels and localization remain constant throughout all stages of the cell cycle. Truncated ATM protein was not detected in lymphoblasts from ataxia-telangiectasia-patients homozygous for mutations leading to premature protein termination. Exposure of normal human cells to gamma-irradiation and the radiomimetic drug neocarzinostatin had no effect on ATM protein levels, in contrast to a noted rise in p53 levels over the same time interval. These findings are consistent with a role for the ATM protein in ensuring the fidelity of DNA repair and cell-cycle regulation following genome damage. ``` ## How to use it in your code: ```python import torch import numpy as np from transformers import DistilBertTokenizerFast, DistilBertForTokenClassification checkpoint = "unikei/distilbert-base-re-punctuate" tokenizer = DistilBertTokenizerFast.from_pretrained(checkpoint) model = DistilBertForTokenClassification.from_pretrained(checkpoint) encoder_max_length = 256 # # Split text to segments of length 200, with overlap 50 # def split_to_segments(wrds, length, overlap): resp = [] i = 0 while True: wrds_split = wrds[(length * i):((length * (i + 1)) + overlap)] if not wrds_split: break resp_obj = { "text": wrds_split, "start_idx": length * i, "end_idx": (length * (i + 1)) + overlap, } resp.append(resp_obj) i += 1 return resp # # Punctuate wordpieces # def punctuate_wordpiece(wordpiece, label): if label.startswith('UPPER'): wordpiece = wordpiece.upper() elif label.startswith('Upper'): wordpiece = wordpiece[0].upper() + wordpiece[1:] if label[-1] != '_' and label[-1] != wordpiece[-1]: wordpiece += label[-1] return wordpiece # # Punctuate text segments (200 words) # def punctuate_segment(wordpieces, word_ids, labels, start_word): result = '' for idx in range(0, len(wordpieces)): if word_ids[idx] == None: continue if word_ids[idx] < start_word: continue wordpiece = punctuate_wordpiece(wordpieces[idx][2:] if wordpieces[idx].startswith('##') else wordpieces[idx], labels[idx]) if idx > 0 and len(result) > 0 and word_ids[idx] != word_ids[idx - 1] and result[-1] != '-': result += ' ' result += wordpiece return result # # Tokenize, predict, punctuate text segments (200 words) # def process_segment(words, tokenizer, model, start_word): tokens = tokenizer(words['text'], padding="max_length", # truncation=True, max_length=encoder_max_length, is_split_into_words=True, return_tensors='pt') with torch.no_grad(): logits = model(**tokens).logits logits = logits.cpu() predictions = np.argmax(logits, axis=-1) wordpieces = tokens.tokens() word_ids = tokens.word_ids() id2label = model.config.id2label labels = [[id2label[p.item()] for p in prediction] for prediction in predictions][0] return punctuate_segment(wordpieces, word_ids, labels, start_word) # # Punctuate text of any length # def punctuate(text, tokenizer, model): text = text.lower() text = text.replace('\n', ' ') words = text.split(' ') overlap = 50 slices = split_to_segments(words, 150, 50) result = "" start_word = 0 for text in slices: corrected = process_segment(text, tokenizer, model, start_word) result += corrected + ' ' start_word = overlap return result # # Example # text = "the atm protein is a single high molecular weight protein predominantly confined to the nucleus of human fibroblasts but is present in both nuclear and microsomal fractions from human lymphoblast cells and peripheral blood lymphocytes atm protein levels and localization remain constant throughout all stages of the cell cycle truncated atm protein was not detected in lymphoblasts from ataxia telangiectasia patients homozygous for mutations leading to premature protein termination exposure of normal human cells to gamma irradiation and the radiomimetic drug neocarzinostatin had no effect on atm protein levels in contrast to a noted rise in p53 levels over the same time interval these findings are consistent with a role for the atm protein in ensuring the fidelity of dna repair and cell cycle regulation following genome damage" result = punctuate(text, tokenizer, model) print(result) """ Output: The ATM protein is a single, high-molecular-weight protein predominantly confined to the nucleus of human fibroblasts, but is present in both nuclear and microsomal fractions from human lymphoblast cells and peripheral blood lymphocytes. ATM protein levels and localization remain constant throughout all stages of the cell cycle. Truncated ATM protein was not detected in lymphoblasts from ataxia-telangiectasia-patients homozygous for mutations leading to premature protein termination. Exposure of normal human cells to gamma-irradiation and the radiomimetic drug neocarzinostatin had no effect on ATM protein levels, in contrast to a noted rise in p53 levels over the same time interval. These findings are consistent with a role for the ATM protein in ensuring the fidelity of DNA repair and cell-cycle regulation following genome damage. """ ```
7,668
[ [ -0.004974365234375, -0.07373046875, 0.041412353515625, 0.009368896484375, -0.0267791748046875, 0.00539398193359375, 0.00652313232421875, -0.022735595703125, 0.0136260986328125, 0.022491455078125, -0.050384521484375, -0.0386962890625, -0.048919677734375, 0.03...
KappaNeuro/movie-poster
2023-09-14T09:58:26.000Z
[ "diffusers", "text-to-image", "stable-diffusion", "lora", "movie", "art", "posters", "style", "painting", "form", "movie poster", "license:other", "region:us", "has_space" ]
text-to-image
KappaNeuro
null
null
KappaNeuro/movie-poster
2
473
diffusers
2023-09-14T09:58:21
--- license: other tags: - text-to-image - stable-diffusion - lora - diffusers - movie - art - posters - style - painting - form - movie poster base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: Movie Poster page widget: - text: "Movie Poster - a vintage poster for a mystery movie including the title and credits" - text: "Movie Poster - 1985 Drew Struzan movie poster of Opposites Attract" - text: "Movie Poster - The electrifying movie poster showcases a captivating scene merging major United States war moments, with a fearless soldier in modern combat gear and an American flag patch, standing tall amid a backdrop of intense reds and brooding tones. Ghostly silhouettes of charging soldiers from Desert Storm, explosions, and soaring aircraft create a dynamic atmosphere, while a Gulf War tank emerges from smoke, accompanied by a hovering Vietnam-era helicopter. Bold metallic lettering at the top reads \"United in Battle,\" while splashes of vibrant colors and subtle visual effects enhance the overall impact, promising an enthralling cinematic experience interweaving heroic tales from different eras into the epic narrative of battle chronicles" - text: "Movie Poster - Coming of Age War Drama movie poster Ukraine 2022 Adolescence in Turmoil War-Torn Ukraine Struggle for Identity Loss and Resilience Innocence Shattered Bonds of Friendship Desperate Choices Courage Amidst Chaos Confronting Prejudice A Nation United Quest for Justice Humanitarian Crisis Hope Against the Odds Unyielding Determination Resisting Oppression Generational Divide Sacrifice and Survival Defiance and Rebellion Personal Growth and Maturity A Journey of Empathy and Understanding" - text: "Movie Poster - a movie poster featuring the heroic founders of a toilet paper company starring in an action movie based in Melbourne Australia." - text: "Movie Poster - movie poster for a 1970's action movie about a 1800's female doctor, a priest and 3 cowboys fighting triad members in a alley" - text: "Movie Poster - a movie poster to a movie from 1973 picturing a submarine and a ufo in a polar enviroment. An explosion. Soldiers with guns." - text: "Movie Poster - sports movie poster of two black college basketball players facing each other, one 20 years old and the other 40 years old" - text: "Movie Poster - a captivating movie poster featuring a thrilling action-packed scene. The poster should include a courageous protagonist, intense lighting, dynamic composition, and vibrant colors. The title of the movie should be prominently displayed, and the tagline should evoke excitement and intrigue. Customize the keywords below to personalize theProtagonist: [Enter the description of the main character, e.g., a skilled detective, a fearless superhero] Lighting: [Choose the lighting style, e.g., dramatic shadows, neon lights, vibrant backlighting] Composition: [Specify the desired composition, e.g., dynamic diagonal lines, asymmetric layout] Colors: [Select the color scheme, e.g., bold and contrasting colors, moody and desaturated tones] Title: [Provide the movie title or a placeholder title] Tagline: [Compose an exciting and intriguing tagline for the movie]" --- # Movie Poster ([CivitAI](https://civitai.com/models/154072) ![Image 0](2329606.jpeg) > Movie Poster - a vintage poster for a mystery movie including the title and credits <p>From an artistic perspective, movie posters are a form of art specifically created for the visual representation and promotion of films. They combine graphic design, photography, illustrations, and typography to create a visually striking and captivating image that conveys the mood, genre, and key aspects of the film.</p><p>Artistic aspects of movie posters include the choice of composition, color palette, use of proportions, and visual elements such as fonts and lines. The artistic approach in creating a movie poster aims to effectively convey the atmosphere and emotional impact of the film.</p><p>The design elements of a movie poster, such as the arrangement of images, typography, and use of color, play a crucial role in capturing the attention of viewers and evoking their interest in the film. The artistic choices made in the poster's creation contribute to its visual impact and its ability to communicate the essence of the film.</p><p>Movie posters often employ various artistic styles and techniques, ranging from minimalistic and abstract designs to realistic illustrations or photographs. The artistic interpretation of the film's themes and characters can influence the overall aesthetic of the poster.</p><p>In many cases, movie posters become highly collectible and appreciated as works of art beyond their promotional function. They can reflect the artistic trends of their time, serve as a visual record of film history, and even inspire and influence other artists.</p><p>In summary, movie posters are a form of artistic expression that combines design, illustration, typography, and photography to create visually captivating representations of films. They play a vital role in promoting movies and can be appreciated for their artistic merit and cultural significance.</p> ## Image examples for the model: ![Image 1](2329668.jpeg) > Movie Poster - 1985 Drew Struzan movie poster of Opposites Attract ![Image 2](2329496.jpeg) > Movie Poster - The electrifying movie poster showcases a captivating scene merging major United States war moments, with a fearless soldier in modern combat gear and an American flag patch, standing tall amid a backdrop of intense reds and brooding tones. Ghostly silhouettes of charging soldiers from Desert Storm, explosions, and soaring aircraft create a dynamic atmosphere, while a Gulf War tank emerges from smoke, accompanied by a hovering Vietnam-era helicopter. Bold metallic lettering at the top reads "United in Battle," while splashes of vibrant colors and subtle visual effects enhance the overall impact, promising an enthralling cinematic experience interweaving heroic tales from different eras into the epic narrative of battle chronicles ![Image 3](2329495.jpeg) > Movie Poster - Coming of Age War Drama movie poster Ukraine 2022 Adolescence in Turmoil War-Torn Ukraine Struggle for Identity Loss and Resilience Innocence Shattered Bonds of Friendship Desperate Choices Courage Amidst Chaos Confronting Prejudice A Nation United Quest for Justice Humanitarian Crisis Hope Against the Odds Unyielding Determination Resisting Oppression Generational Divide Sacrifice and Survival Defiance and Rebellion Personal Growth and Maturity A Journey of Empathy and Understanding ![Image 4](2329498.jpeg) > ![Image 5](2329500.jpeg) > Movie Poster - a movie poster featuring the heroic founders of a toilet paper company starring in an action movie based in Melbourne Australia. ![Image 6](2329528.jpeg) > Movie Poster - movie poster for a 1970's action movie about a 1800's female doctor, a priest and 3 cowboys fighting triad members in a alley ![Image 7](2329529.jpeg) > Movie Poster - a movie poster to a movie from 1973 picturing a submarine and a ufo in a polar enviroment. An explosion. Soldiers with guns. ![Image 8](2329527.jpeg) > Movie Poster - sports movie poster of two black college basketball players facing each other, one 20 years old and the other 40 years old ![Image 9](2329497.jpeg) > Movie Poster - a captivating movie poster featuring a thrilling action-packed scene. The poster should include a courageous protagonist, intense lighting, dynamic composition, and vibrant colors. The title of the movie should be prominently displayed, and the tagline should evoke excitement and intrigue. Customize the keywords below to personalize theProtagonist: [Enter the description of the main character, e.g., a skilled detective, a fearless superhero] Lighting: [Choose the lighting style, e.g., dramatic shadows, neon lights, vibrant backlighting] Composition: [Specify the desired composition, e.g., dynamic diagonal lines, asymmetric layout] Colors: [Select the color scheme, e.g., bold and contrasting colors, moody and desaturated tones] Title: [Provide the movie title or a placeholder title] Tagline: [Compose an exciting and intriguing tagline for the movie]
8,220
[ [ -0.04754638671875, -0.0316162109375, 0.0418701171875, 0.0081787109375, -0.0257110595703125, 0.046661376953125, 0.0362548828125, -0.021759033203125, 0.0511474609375, 0.037384033203125, -0.04425048828125, -0.01873779296875, -0.05450439453125, -0.00672149658203...
facebook/convnext-base-224
2023-06-13T19:40:09.000Z
[ "transformers", "pytorch", "tf", "convnext", "image-classification", "vision", "dataset:imagenet-1k", "arxiv:2201.03545", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
image-classification
facebook
null
null
facebook/convnext-base-224
7
472
transformers
2022-03-02T23:29:05
--- license: apache-2.0 tags: - vision - image-classification datasets: - imagenet-1k widget: - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg example_title: Tiger - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg example_title: Teapot - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg example_title: Palace --- # ConvNeXT (base-sized model) ConvNeXT model trained on ImageNet-1k at resolution 224x224. It was introduced in the paper [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) by Liu et al. and first released in [this repository](https://github.com/facebookresearch/ConvNeXt). Disclaimer: The team releasing ConvNeXT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description ConvNeXT is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, that claims to outperform them. The authors started from a ResNet and "modernized" its design by taking the Swin Transformer as inspiration. ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnext_architecture.png) ## Intended uses & limitations You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=convnext) to look for fine-tuned versions on a task that interests you. ### How to use Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes: ```python from transformers import ConvNextImageProcessor, ConvNextForImageClassification import torch from datasets import load_dataset dataset = load_dataset("huggingface/cats-image") image = dataset["test"]["image"][0] processor = ConvNextImageProcessor.from_pretrained("facebook/convnext-base-224") model = ConvNextForImageClassification.from_pretrained("facebook/convnext-base-224") inputs = processor(image, return_tensors="pt") with torch.no_grad(): logits = model(**inputs).logits # model predicts one of the 1000 ImageNet classes predicted_label = logits.argmax(-1).item() print(model.config.id2label[predicted_label]), ``` For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/convnext). ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2201-03545, author = {Zhuang Liu and Hanzi Mao and Chao{-}Yuan Wu and Christoph Feichtenhofer and Trevor Darrell and Saining Xie}, title = {A ConvNet for the 2020s}, journal = {CoRR}, volume = {abs/2201.03545}, year = {2022}, url = {https://arxiv.org/abs/2201.03545}, eprinttype = {arXiv}, eprint = {2201.03545}, timestamp = {Thu, 20 Jan 2022 14:21:35 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-2201-03545.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
3,056
[ [ -0.05047607421875, -0.03564453125, -0.014617919921875, 0.01000213623046875, -0.0248870849609375, -0.0223541259765625, -0.006427764892578125, -0.056396484375, 0.0311737060546875, 0.03466796875, -0.0457763671875, -0.0206756591796875, -0.037567138671875, -0.003...
microsoft/unispeech-sat-base-plus
2021-11-05T12:40:37.000Z
[ "transformers", "pytorch", "unispeech-sat", "pretraining", "speech", "en", "arxiv:1912.07875", "arxiv:2106.06909", "arxiv:2101.00390", "arxiv:2110.05752", "endpoints_compatible", "region:us" ]
null
microsoft
null
null
microsoft/unispeech-sat-base-plus
0
472
transformers
2022-03-02T23:29:05
--- language: - en tags: - speech --- # UniSpeech-SAT-Base [Microsoft's UniSpeech](https://www.microsoft.com/en-us/research/publication/unispeech-unified-speech-representation-learning-with-labeled-and-unlabeled-data/) The base model pretrained on 16kHz sampled speech audio with utterance and speaker contrastive loss. When using the model, make sure that your speech input is also sampled at 16kHz. **Note**: This model does not have a tokenizer as it was pretrained on audio alone. In order to use this model **speech recognition**, a tokenizer should be created and the model should be fine-tuned on labeled text data. Check out [this blog](https://huggingface.co/blog/fine-tune-wav2vec2-english) for more in-detail explanation of how to fine-tune the model. The model was pre-trained on: - 60,000 hours of [Libri-Light](https://arxiv.org/abs/1912.07875) - 10,000 hours of [GigaSpeech](https://arxiv.org/abs/2106.06909) - 24,000 hours of [VoxPopuli](https://arxiv.org/abs/2101.00390) [Paper: UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) Authors: Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu **Abstract** *Self-supervised learning (SSL) is a long-standing goal for speech processing, since it utilizes large-scale unlabeled data and avoids extensive human labeling. Recent years witness great successes in applying self-supervised learning in speech recognition, while limited exploration was attempted in applying SSL for modeling speaker characteristics. In this paper, we aim to improve the existing SSL framework for speaker representation learning. Two methods are introduced for enhancing the unsupervised speaker information extraction. First, we apply the multi-task learning to the current SSL framework, where we integrate the utterance-wise contrastive loss with the SSL objective function. Second, for better speaker discrimination, we propose an utterance mixing strategy for data augmentation, where additional overlapped utterances are created unsupervisely and incorporate during training. We integrate the proposed methods into the HuBERT framework. Experiment results on SUPERB benchmark show that the proposed system achieves state-of-the-art performance in universal representation learning, especially for speaker identification oriented tasks. An ablation study is performed verifying the efficacy of each proposed method. Finally, we scale up training dataset to 94 thousand hours public audio data and achieve further performance improvement in all SUPERB tasks..* The original model can be found under https://github.com/microsoft/UniSpeech/tree/main/UniSpeech-SAT. # Usage This is an English pre-trained speech model that has to be fine-tuned on a downstream task like speech recognition or audio classification before it can be used in inference. The model was pre-trained in English and should therefore perform well only in English. The model has been shown to work well on task such as speaker verification, speaker identification, and speaker diarization. **Note**: The model was pre-trained on phonemes rather than characters. This means that one should make sure that the input text is converted to a sequence of phonemes before fine-tuning. ## Speech Recognition To fine-tune the model for speech recognition, see [the official speech recognition example](https://github.com/huggingface/transformers/tree/master/examples/pytorch/speech-recognition). ## Speech Classification To fine-tune the model for speech classification, see [the official audio classification example](https://github.com/huggingface/transformers/tree/master/examples/pytorch/audio-classification). ## Speaker Verification TODO ## Speaker Diarization TODO # Contribution The model was contributed by [cywang](https://huggingface.co/cywang) and [patrickvonplaten](https://huggingface.co/patrickvonplaten). # License The official license can be found [here](https://github.com/microsoft/UniSpeech/blob/main/LICENSE) ![design](https://raw.githubusercontent.com/patrickvonplaten/scientific_images/master/UniSpeechSAT.png)
4,212
[ [ -0.0223541259765625, -0.03485107421875, 0.00829315185546875, 0.00884246826171875, -0.0301361083984375, 0.0006880760192871094, -0.0270233154296875, -0.035308837890625, 0.0034770965576171875, 0.03607177734375, -0.024017333984375, -0.030059814453125, -0.03195190429...
oliverguhr/fullstop-dutch-sonar-punctuation-prediction
2023-03-21T10:26:23.000Z
[ "transformers", "pytorch", "safetensors", "roberta", "token-classification", "punctuation prediction", "punctuation", "nl", "dataset:sonar", "arxiv:2301.03319", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
oliverguhr
null
null
oliverguhr/fullstop-dutch-sonar-punctuation-prediction
5
472
transformers
2022-05-02T12:20:47
--- language: - nl tags: - punctuation prediction - punctuation datasets: sonar license: mit widget: - text: "Ondanks dat het nu bijna voorjaar is hebben we nog steds best koude dagen" example_title: "Dutch Sample" metrics: - f1 --- This model predicts the punctuation of Dutch texts. We developed it to restore the punctuation of transcribed spoken language. This model was trained on the [SoNaR Dataset](http://hdl.handle.net/10032/tm-a2-h5). The model restores the following punctuation markers: **"." "," "?" "-" ":"** ## Sample Code We provide a simple python package that allows you to process text of any length. ## Install To get started install the package from [pypi](https://pypi.org/project/deepmultilingualpunctuation/): ```bash pip install deepmultilingualpunctuation ``` ### Restore Punctuation ```python from deepmultilingualpunctuation import PunctuationModel model = PunctuationModel(model="oliverguhr/fullstop-dutch-sonar-punctuation-prediction") text = "hervatting van de zitting ik verklaar de zitting van het europees parlement die op vrijdag 17 december werd onderbroken te zijn hervat" result = model.restore_punctuation(text) print(result) ``` **output** > hervatting van de zitting. ik verklaar de zitting van het europees parlement, die op vrijdag 17 december werd onderbroken, te zijn hervat. ### Predict Labels ```python from deepmultilingualpunctuation import PunctuationModel model = PunctuationModel(model="oliverguhr/fullstop-dutch-sonar-punctuation-prediction") text = "hervatting van de zitting ik verklaar de zitting van het europees parlement die op vrijdag 17 december werd onderbroken te zijn hervat" clean_text = model.preprocess(text) labled_words = model.predict(clean_text) print(labled_words) ``` **output** > [['hervatting', '0', 0.99998724], ['van', '0', 0.9999784], ['de', '0', 0.99991274], ['zitting', '.', 0.6771242], ['ik', '0', 0.9999466], ['verklaar', '0', 0.9998566], ['de', '0', 0.9999783], ['zitting', '0', 0.9999809], ['van', '0', 0.99996245], ['het', '0', 0.99997795], ['europees', '0', 0.9999783], ['parlement', ',', 0.9908242], ['die', '0', 0.999985], ['op', '0', 0.99998224], ['vrijdag', '0', 0.9999831], ['17', '0', 0.99997985], ['december', '0', 0.9999827], ['werd', '0', 0.999982], ['onderbroken', ',', 0.9951485], ['te', '0', 0.9999677], ['zijn', '0', 0.99997723], ['hervat', '.', 0.9957053]] ## Results The performance differs for the single punctuation markers as hyphens and colons, in many cases, are optional and can be substituted by either a comma or a full stop. The model achieves the following F1 scores: | Label | F1 Score | | ------------- | -------- | | 0 | 0.985816 | | . | 0.854380 | | ? | 0.684060 | | , | 0.719308 | | : | 0.696088 | | - | 0.722000 | | macro average | 0.776942 | | micro average | 0.963427 | ## Languages ### Models | Languages | Model | | ------------------------------------------ | ------------------------------------------------------------ | | English, Italian, French and German | [oliverguhr/fullstop-punctuation-multilang-large](https://huggingface.co/oliverguhr/fullstop-punctuation-multilang-large) | | English, Italian, French, German and Dutch | [oliverguhr/fullstop-punctuation-multilingual-sonar-base](https://huggingface.co/oliverguhr/fullstop-punctuation-multilingual-sonar-base) | | Dutch | [oliverguhr/fullstop-dutch-sonar-punctuation-prediction](https://huggingface.co/oliverguhr/fullstop-dutch-sonar-punctuation-prediction) | ### Community Models | Languages | Model | | ------------------------------------------ | ------------------------------------------------------------ | |English, German, French, Spanish, Bulgarian, Italian, Polish, Dutch, Czech, Portugese, Slovak, Slovenian| [kredor/punctuate-all](https://huggingface.co/kredor/punctuate-all) | | Catalan | [softcatala/fullstop-catalan-punctuation-prediction](https://huggingface.co/softcatala/fullstop-catalan-punctuation-prediction) | You can use different models by setting the model parameter: ```python model = PunctuationModel(model = "oliverguhr/fullstop-dutch-punctuation-prediction") ``` ## How to cite us ``` @misc{https://doi.org/10.48550/arxiv.2301.03319, doi = {10.48550/ARXIV.2301.03319}, url = {https://arxiv.org/abs/2301.03319}, author = {Vandeghinste, Vincent and Guhr, Oliver}, keywords = {Computation and Language (cs.CL), Artificial Intelligence (cs.AI), FOS: Computer and information sciences, FOS: Computer and information sciences, I.2.7}, title = {FullStop:Punctuation and Segmentation Prediction for Dutch with Transformers}, publisher = {arXiv}, year = {2023}, copyright = {Creative Commons Attribution Share Alike 4.0 International} } ```
5,095
[ [ -0.0135498046875, -0.06109619140625, 0.038543701171875, 0.04754638671875, -0.0160369873046875, 0.00933074951171875, -0.03558349609375, -0.034088134765625, 0.0189666748046875, 0.026031494140625, -0.0288848876953125, -0.061981201171875, -0.04376220703125, 0.04...
timm/vit_large_patch14_clip_224.openai_ft_in1k
2023-05-06T00:12:00.000Z
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "dataset:wit-400m", "arxiv:2212.07143", "arxiv:2103.00020", "arxiv:2010.11929", "license:apache-2.0", "region:us" ]
image-classification
timm
null
null
timm/vit_large_patch14_clip_224.openai_ft_in1k
0
472
timm
2022-11-02T19:03:57
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k - wit-400m --- # Model card for vit_large_patch14_clip_224.openai_ft_in1k A Vision Transformer (ViT) image classification model. Pretrained on WIT-400M image-text pairs by OpenAI using CLIP. Fine-tuned on ImageNet-1k in `timm`. See recipes in [Reproducible scaling laws](https://arxiv.org/abs/2212.07143). ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 304.2 - GMACs: 77.8 - Activations (M): 57.1 - Image size: 224 x 224 - **Papers:** - Learning Transferable Visual Models From Natural Language Supervision: https://arxiv.org/abs/2103.00020 - Reproducible scaling laws for contrastive language-image learning: https://arxiv.org/abs/2212.07143 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 - **Dataset:** ImageNet-1k - **Pretrain Dataset:** - WIT-400M ## 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('vit_large_patch14_clip_224.openai_ft_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( 'vit_large_patch14_clip_224.openai_ft_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, 257, 1024) 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{Radford2021LearningTV, title={Learning Transferable Visual Models From Natural Language Supervision}, author={Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and Sandhini Agarwal and Girish Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and Ilya Sutskever}, booktitle={ICML}, year={2021} } ``` ```bibtex @article{cherti2022reproducible, title={Reproducible scaling laws for contrastive language-image learning}, author={Cherti, Mehdi and Beaumont, Romain and Wightman, Ross and Wortsman, Mitchell and Ilharco, Gabriel and Gordon, Cade and Schuhmann, Christoph and Schmidt, Ludwig and Jitsev, Jenia}, journal={arXiv preprint arXiv:2212.07143}, year={2022} } ``` ```bibtex @article{dosovitskiy2020vit, title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale}, author={Dosovitskiy, Alexey and Beyer, Lucas and Kolesnikov, Alexander and Weissenborn, Dirk and Zhai, Xiaohua and Unterthiner, Thomas and Dehghani, Mostafa and Minderer, Matthias and Heigold, Georg and Gelly, Sylvain and Uszkoreit, Jakob and Houlsby, Neil}, journal={ICLR}, year={2021} } ``` ```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}} } ```
4,369
[ [ -0.031982421875, -0.03875732421875, 0.0038299560546875, 0.0173492431640625, -0.0232086181640625, -0.033355712890625, -0.033782958984375, -0.032012939453125, 0.0121307373046875, 0.031524658203125, -0.0303497314453125, -0.040069580078125, -0.057525634765625, -...
digiplay/FumizukiMix_v1
2023-07-12T22:49:15.000Z
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "license:other", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
digiplay
null
null
digiplay/FumizukiMix_v1
1
472
diffusers
2023-07-12T22:33:07
--- license: other tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers inference: true --- Model info: https://civitai.com/models/107380/fumizukimix ![Screenshot_20230713_063348_Vivaldi Browser Snapshot.jpg](https://cdn-uploads.huggingface.co/production/uploads/646c83c871d0c8a6e4455854/yPC1NrFq_TXt3njI6DM4f.jpeg)
350
[ [ -0.046417236328125, -0.0171051025390625, 0.0323486328125, 0.01280975341796875, -0.02001953125, -0.002117156982421875, 0.0300750732421875, -0.0135040283203125, 0.05096435546875, 0.035736083984375, -0.07122802734375, 0.00960540771484375, -0.00013840198516845703, ...
Helsinki-NLP/opus-mt-ar-es
2023-08-16T11:25:40.000Z
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "ar", "es", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
Helsinki-NLP
null
null
Helsinki-NLP/opus-mt-ar-es
0
471
transformers
2022-03-02T23:29:04
--- language: - ar - es tags: - translation license: apache-2.0 --- ### ara-spa * source group: Arabic * target group: Spanish * OPUS readme: [ara-spa](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/ara-spa/README.md) * model: transformer * source language(s): apc apc_Latn ara arq * target language(s): spa * model: transformer * pre-processing: normalization + SentencePiece (spm32k,spm32k) * download original weights: [opus-2020-07-03.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/ara-spa/opus-2020-07-03.zip) * test set translations: [opus-2020-07-03.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ara-spa/opus-2020-07-03.test.txt) * test set scores: [opus-2020-07-03.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ara-spa/opus-2020-07-03.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | Tatoeba-test.ara.spa | 46.0 | 0.641 | ### System Info: - hf_name: ara-spa - source_languages: ara - target_languages: spa - opus_readme_url: https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/ara-spa/README.md - original_repo: Tatoeba-Challenge - tags: ['translation'] - languages: ['ar', 'es'] - src_constituents: {'apc', 'ara', 'arq_Latn', 'arq', 'afb', 'ara_Latn', 'apc_Latn', 'arz'} - tgt_constituents: {'spa'} - src_multilingual: False - tgt_multilingual: False - prepro: normalization + SentencePiece (spm32k,spm32k) - url_model: https://object.pouta.csc.fi/Tatoeba-MT-models/ara-spa/opus-2020-07-03.zip - url_test_set: https://object.pouta.csc.fi/Tatoeba-MT-models/ara-spa/opus-2020-07-03.test.txt - src_alpha3: ara - tgt_alpha3: spa - short_pair: ar-es - chrF2_score: 0.6409999999999999 - bleu: 46.0 - brevity_penalty: 0.9620000000000001 - ref_len: 9708.0 - src_name: Arabic - tgt_name: Spanish - train_date: 2020-07-03 - src_alpha2: ar - tgt_alpha2: es - prefer_old: False - long_pair: ara-spa - helsinki_git_sha: 480fcbe0ee1bf4774bcbe6226ad9f58e63f6c535 - transformers_git_sha: 2207e5d8cb224e954a7cba69fa4ac2309e9ff30b - port_machine: brutasse - port_time: 2020-08-21-14:41
2,149
[ [ -0.034820556640625, -0.04534912109375, 0.017669677734375, 0.0301513671875, -0.02923583984375, -0.0112457275390625, -0.017059326171875, -0.031890869140625, 0.0198822021484375, 0.025787353515625, -0.037445068359375, -0.061004638671875, -0.048858642578125, 0.03...
digiplay/PlanetBumix_v1
2023-07-22T13:37:38.000Z
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "license:other", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
digiplay
null
null
digiplay/PlanetBumix_v1
2
471
diffusers
2023-06-18T04:59:37
--- license: other tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers inference: true --- Model info: https://civitai.com/models/91651/orplanetbumix Original Author's DEMO image : ![](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7f789b00-80fc-4ba8-bb5a-034cd50f58d6/width=768/02451-1774884344-Alien%20planet,%201girl,%20extraterrestrial%20beings,%20unknown%20landscapes,%20interstellar%20exploration.jpeg) Sample image I made: ![](https://cdn-uploads.huggingface.co/production/uploads/646c83c871d0c8a6e4455854/b148kseNrXErVA2GfHtO0.jpeg)
578
[ [ -0.033660888671875, -0.028594970703125, 0.0270233154296875, 0.011199951171875, -0.0237579345703125, -0.005084991455078125, 0.0211334228515625, -0.01450347900390625, 0.053741455078125, 0.043853759765625, -0.0699462890625, -0.034332275390625, -0.0251007080078125, ...
Gayathri142214002/t5_Question_Generation
2023-09-27T08:49:23.000Z
[ "transformers", "pytorch", "t5", "text2text-generation", "generated_from_trainer", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
Gayathri142214002
null
null
Gayathri142214002/t5_Question_Generation
0
471
transformers
2023-09-06T05:31:23
--- license: apache-2.0 tags: - generated_from_trainer model-index: - name: t5_Question_Generation 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. --> # t5_Question_Generation This model is a fine-tuned version of [t5-base](https://huggingface.co/t5-base) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 0.6598 ## 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: 0.0001 - train_batch_size: 1 - eval_batch_size: 1 - seed: 42 - gradient_accumulation_steps: 4 - total_train_batch_size: 4 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 7 ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:----:|:---------------:| | 1.1138 | 4.55 | 100 | 0.6598 | ### Framework versions - Transformers 4.29.2 - Pytorch 2.0.1+cu117 - Datasets 2.12.0 - Tokenizers 0.13.3
1,306
[ [ -0.0345458984375, -0.03631591796875, 0.01377105712890625, 0.0113983154296875, -0.029144287109375, -0.02294921875, -0.006076812744140625, -0.01483154296875, -0.00609588623046875, 0.029022216796875, -0.06158447265625, -0.05450439453125, -0.04925537109375, -0.0...
google/realm-cc-news-pretrained-scorer
2022-01-06T06:23:03.000Z
[ "transformers", "pytorch", "realm", "en", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
google
null
null
google/realm-cc-news-pretrained-scorer
0
470
transformers
2022-03-02T23:29:05
--- language: en license: apache-2.0 --- # realm-cc-news-pretrained-scorer ## Model description The REALM checkpoint pretrained with CC-News as target corpus and Wikipedia as knowledge corpus, converted from the TF checkpoint provided by Google Language. The original paper, code, and checkpoints can be found [here](https://github.com/google-research/language/tree/master/language/realm). ## Usage ```python from transformers import RealmScorer scorer = RealmScorer.from_pretrained("qqaatw/realm-cc-news-pretrained-scorer") ```
536
[ [ 0.0010051727294921875, -0.046905517578125, 0.023223876953125, -0.0011415481567382812, -0.006519317626953125, 0.0159912109375, -0.00396728515625, 0.00989532470703125, 0.01531219482421875, 0.04046630859375, -0.0599365234375, -0.046356201171875, -0.028289794921875,...
timm/seresnext26ts.ch_in1k
2023-03-22T07:29:14.000Z
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:1709.01507", "arxiv:1611.05431", "license:apache-2.0", "region:us" ]
image-classification
timm
null
null
timm/seresnext26ts.ch_in1k
0
470
timm
2023-03-22T07:29:05
--- tags: - image-classification - timm library_tag: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for seresnext26ts.ch_in1k A SE-ResNeXt image classification model (ResNeXt with 'Squeeze-and-Excitation' channel attention). This model features a tiered 3-layer stem and SiLU activations. Trained on ImageNet-1k by Ross Wightman in `timm`. 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): 10.4 - GMACs: 2.4 - Activations (M): 10.5 - Image size: train = 256 x 256, test = 288 x 288 - **Papers:** - Squeeze-and-Excitation Networks: https://arxiv.org/abs/1709.01507 - Aggregated Residual Transformations for Deep Neural Networks: https://arxiv.org/abs/1611.05431 - **Dataset:** ImageNet-1k - **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('seresnext26ts.ch_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( 'seresnext26ts.ch_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, 128, 128]) # torch.Size([1, 256, 64, 64]) # torch.Size([1, 512, 32, 32]) # torch.Size([1, 1024, 16, 16]) # torch.Size([1, 2048, 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( 'seresnext26ts.ch_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, 2048, 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 @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{hu2018senet, title={Squeeze-and-Excitation Networks}, author={Jie Hu and Li Shen and Gang Sun}, journal={IEEE Conference on Computer Vision and Pattern Recognition}, year={2018} } ``` ```bibtex @article{Xie2016, title={Aggregated Residual Transformations for Deep Neural Networks}, author={Saining Xie and Ross Girshick and Piotr Dollár and Zhuowen Tu and Kaiming He}, journal={arXiv preprint arXiv:1611.05431}, year={2016} } ```
4,942
[ [ -0.035552978515625, -0.03466796875, 0.00603485107421875, 0.00946044921875, -0.023712158203125, -0.0236358642578125, -0.018310546875, -0.030792236328125, 0.0267181396484375, 0.032379150390625, -0.040618896484375, -0.047027587890625, -0.050537109375, -0.016754...
adityashukzy/bart-base-arxiv-sum-session-1
2023-04-12T10:03:25.000Z
[ "transformers", "pytorch", "tensorboard", "bart", "text2text-generation", "summarization", "generated_from_trainer", "dataset:arxiv_summarization_dataset", "dataset:ccdv/arxiv-summarization", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
summarization
adityashukzy
null
null
adityashukzy/bart-base-arxiv-sum-session-1
2
470
transformers
2023-04-12T07:43:51
--- license: apache-2.0 tags: - summarization - generated_from_trainer datasets: - arxiv_summarization_dataset - ccdv/arxiv-summarization metrics: - rouge model-index: - name: bart-base-arxiv-sum-session-1 results: - task: name: Sequence-to-sequence Language Modeling type: text2text-generation dataset: name: arxiv_summarization_dataset type: arxiv_summarization_dataset config: section split: validation args: section metrics: - name: Rouge1 type: rouge value: 12.7479 --- <!-- 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. --> # bart-base-arxiv-sum-session-1 This model is a fine-tuned version of [facebook/bart-base](https://huggingface.co/facebook/bart-base) on the arxiv_summarization_dataset dataset. It achieves the following results on the evaluation set: - Loss: 2.8862 - Rouge1: 12.7479 - Rouge2: 4.8295 - Rougel: 10.2761 - Rougelsum: 11.7334 ## Model description Model obtained from fine-tuning facebook/bart-base on 25,000 training samples from the ccdv/arxiv-summarization dataset. ## 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: 8 - eval_batch_size: 8 - seed: 42 - gradient_accumulation_steps: 16 - total_train_batch_size: 128 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | |:-------------:|:-----:|:----:|:---------------:|:-------:|:------:|:-------:|:---------:| | No log | 1.0 | 195 | 2.9794 | 12.5852 | 4.6927 | 10.1374 | 11.6014 | | No log | 2.0 | 390 | 2.9077 | 12.5854 | 4.7568 | 10.166 | 11.5699 | | No log | 3.0 | 585 | 2.8862 | 12.7479 | 4.8295 | 10.2761 | 11.7334 | ### Framework versions - Transformers 4.27.4 - Pytorch 1.13.0 - Datasets 2.1.0 - Tokenizers 0.13.2
2,296
[ [ -0.03857421875, -0.052154541015625, 0.0081024169921875, 0.008270263671875, -0.0154876708984375, -0.018218994140625, -0.00727081298828125, -0.017120361328125, 0.023223876953125, 0.0350341796875, -0.047882080078125, -0.048248291015625, -0.040985107421875, -0.0...
robinsyihab/Sidrap-7B-v1
2023-10-02T03:51:45.000Z
[ "transformers", "pytorch", "mistral", "text-generation", "code", "id", "license:apache-2.0", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
robinsyihab
null
null
robinsyihab/Sidrap-7B-v1
4
470
transformers
2023-09-29T14:32:41
--- license: apache-2.0 language: - id library_name: transformers pipeline_tag: text-generation tags: - code --- # LLM Model for Bahasa Indonesia Dialog Sidrap-7B-v1 is a Large Language Model (LLM) trained and fine-tuned on a Bahasa Indonesia public dataset. It is designed to enable conversations and dialogues in bahasa Indonesia. The base model used for fine-tuning is [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1). ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer device = "cuda" # the device to load the model onto model = AutoModelForCausalLM.from_pretrained("robinsyihab/Sidrap-7B-v1") tokenizer = AutoTokenizer.from_pretrained("robinsyihab/Sidrap-7B-v1") messages = [ {"role": "system", "content": "Anda adalah asisten yang suka membantu, penuh hormat, dan jujur. Selalu jawab semaksimal mungkin, sambil tetap aman. Jawaban Anda tidak boleh berisi konten berbahaya, tidak etis, rasis, seksis, beracun, atau ilegal. Harap pastikan bahwa tanggapan Anda tidak memihak secara sosial dan bersifat positif.\n\ Jika sebuah pertanyaan tidak masuk akal, atau tidak koheren secara faktual, jelaskan alasannya daripada menjawab sesuatu yang tidak benar. Jika Anda tidak mengetahui jawaban atas sebuah pertanyaan, mohon jangan membagikan informasi palsu."}, {"role": "user", "content": "buatkan kode program, sebuah fungsi untuk memvalidasi alamat email menggunakan regex"} ] encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt") model_inputs = encodeds.to(device) model.to(device) generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True) decoded = tokenizer.batch_decode(generated_ids) print(decoded[0]) ``` **NOTES:** To achieve optimal results in Bahasa Indonesia, please use a system message as the initial input as demonstrated above. ## Model Architecture This model is based on Mistral-7B-v0.1, a transformer model with the following architecture choices: * Grouped-Query Attention * Sliding-Window Attention * Byte-fallback BPE tokenizer ## Limitations and Ethical Considerations The Sidrap-7B-v1 model has been trained on a public dataset and does not have any moderation mechanism. It may still have limitations and biases. It is always recommended to review and evaluate the generated outputs for any potential issues. We're looking forward to engaging with the community on ways to make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs. Furthermore, please ensure that the usage of this language model is aligned with ethical guidelines, respectful of privacy, and avoids harmful content generation. ### Citation If you use the Sidrap-7B-v1 model in your research or project, please cite it as: ``` @article{Sidrap, title={Sidrap-7B-v1: LLM Model for Bahasa Indonesia Dialog}, author={Robin Syihab}, publisher={Hugging Face} journal={Hugging Face Repository}, year={2023} } ```
2,978
[ [ -0.019287109375, -0.0677490234375, 0.00896453857421875, 0.032318115234375, -0.045745849609375, -0.0196075439453125, -0.01354217529296875, -0.0199432373046875, 0.0174102783203125, 0.043121337890625, -0.048736572265625, -0.042083740234375, -0.039642333984375, ...
Graphcore/roberta-base-ipu
2023-07-07T10:49:29.000Z
[ "optimum_graphcore", "arxiv:1907.11692", "license:apache-2.0", "region:us" ]
null
Graphcore
null
null
Graphcore/roberta-base-ipu
1
469
null
2022-03-02T23:29:04
--- license: apache-2.0 --- # Graphcore/roberta-base-ipu Optimum Graphcore is a new open-source library and toolkit that enables developers to access IPU-optimized models certified by Hugging Face. It is an extension of Transformers, providing a set of performance optimization tools enabling maximum efficiency to train and run models on Graphcore’s IPUs - a completely new kind of massively parallel processor to accelerate machine intelligence. Learn more about how to take train Transformer models faster with IPUs at [hf.co/hardware/graphcore](https://huggingface.co/hardware/graphcore). Through HuggingFace Optimum, Graphcore released ready-to-use IPU-trained model checkpoints and IPU configuration files to make it easy to train models with maximum efficiency in the IPU. Optimum shortens the development lifecycle of your AI models by letting you plug-and-play any public dataset and allows a seamless integration to our State-of-the-art hardware giving you a quicker time-to-value for your AI project. ## Model description RoBERTa is based on BERT pretraining approach and improves on it by carefully evaluating a number of design decisions of BERT pretraining which it found to cause the model to be undertrained. It suggested a way to improve the performance by training the model longer, with bigger batches over more data, removing the next sentence prediction objectives, training on longer sequences and dynamically changing the mask pattern applied to the training data. As a result, it achieved state-of-the-art results on GLUE, RACE and SQuAD. Paper link : [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/pdf/1907.11692.pdf) ## Intended uses & limitations This model contains just the `IPUConfig` files for running the [roberta-base](https://huggingface.co/roberta-base) model on Graphcore IPUs. ## Usage ``` from optimum.graphcore import IPUConfig ipu_config = IPUConfig.from_pretrained("Graphcore/roberta-base-ipu") ```
1,980
[ [ -0.043701171875, -0.0572509765625, 0.0129547119140625, 0.01337432861328125, -0.01727294921875, 0.02691650390625, -0.01324462890625, -0.028411865234375, -0.0025691986083984375, 0.027618408203125, -0.048980712890625, -0.03289794921875, -0.054962158203125, -0.0...
climatebert/distilroberta-base-climate-detector
2023-06-20T18:52:03.000Z
[ "transformers", "pytorch", "safetensors", "roberta", "text-classification", "en", "dataset:climatebert/climate_detection", "license:apache-2.0", "endpoints_compatible", "region:us" ]
text-classification
climatebert
null
null
climatebert/distilroberta-base-climate-detector
5
469
transformers
2022-03-02T23:29:05
--- license: apache-2.0 datasets: - climatebert/climate_detection language: - en metrics: - accuracy --- # Model Card for distilroberta-base-climate-detector ## Model Description This is the fine-tuned ClimateBERT language model with a classification head for detecting climate-related paragraphs. Using the [climatebert/distilroberta-base-climate-f](https://huggingface.co/climatebert/distilroberta-base-climate-f) language model as starting point, the distilroberta-base-climate-detector model is fine-tuned on our [climatebert/climate_detection](https://huggingface.co/climatebert/climate_detection) dataset. *Note: This model is trained on paragraphs. It may not perform well on sentences.* ## Citation Information ```bibtex @techreport{bingler2023cheaptalk, title={How Cheap Talk in Climate Disclosures Relates to Climate Initiatives, Corporate Emissions, and Reputation Risk}, author={Bingler, Julia and Kraus, Mathias and Leippold, Markus and Webersinke, Nicolas}, type={Working paper}, institution={Available at SSRN 3998435}, year={2023} } ``` ## How to Get Started With the Model You can use the model with a pipeline for text classification: ```python from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline from transformers.pipelines.pt_utils import KeyDataset import datasets from tqdm.auto import tqdm dataset_name = "climatebert/climate_detection" model_name = "climatebert/distilroberta-base-climate-detector" # If you want to use your own data, simply load them as 🤗 Datasets dataset, see https://huggingface.co/docs/datasets/loading dataset = datasets.load_dataset(dataset_name, split="test") model = AutoModelForSequenceClassification.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name, max_len=512) pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0) # See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline for out in tqdm(pipe(KeyDataset(dataset, "text"), padding=True, truncation=True)): print(out) ```
2,089
[ [ -0.03271484375, -0.03973388671875, 0.0267791748046875, 0.004673004150390625, -0.02923583984375, 0.00237274169921875, -0.01136016845703125, -0.015594482421875, -0.00751495361328125, 0.021392822265625, -0.033203125, -0.0548095703125, -0.06463623046875, -0.0048...
pucpr/clinicalnerpt-disease
2021-10-13T09:33:02.000Z
[ "transformers", "pytorch", "bert", "token-classification", "pt", "dataset:SemClinBr", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
pucpr
null
null
pucpr/clinicalnerpt-disease
8
469
transformers
2022-03-02T23:29:05
--- language: "pt" widget: - text: "DEVIDO AO FATO DE TER DPOC E APRESENTADO DISFUNÇÃO RESPIRATÓRIA AGUDA COM INFILTRADO PULMONAR EM BASE DIREITA" - text: "Paciente com Sepse pulmonar em D8 tazocin (paciente não recebeu por 2 dias Atb)." datasets: - SemClinBr thumbnail: "https://raw.githubusercontent.com/HAILab-PUCPR/BioBERTpt/master/images/logo-biobertpr1.png" --- <img src="https://raw.githubusercontent.com/HAILab-PUCPR/BioBERTpt/master/images/logo-biobertpr1.png" alt="Logo BioBERTpt"> # Portuguese Clinical NER - Disease The Disease NER model is part of the [BioBERTpt project](https://www.aclweb.org/anthology/2020.clinicalnlp-1.7/), where 13 models of clinical entities (compatible with UMLS) were trained. All NER model from "pucpr" user was trained from the Brazilian clinical corpus [SemClinBr](https://github.com/HAILab-PUCPR/SemClinBr), with 10 epochs and IOB2 format, from BioBERTpt(all) model. ## Acknowledgements This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001. ## Citation ``` @inproceedings{schneider-etal-2020-biobertpt, title = "{B}io{BERT}pt - A {P}ortuguese Neural Language Model for Clinical Named Entity Recognition", author = "Schneider, Elisa Terumi Rubel and de Souza, Jo{\~a}o Vitor Andrioli and Knafou, Julien and Oliveira, Lucas Emanuel Silva e and Copara, Jenny and Gumiel, Yohan Bonescki and Oliveira, Lucas Ferro Antunes de and Paraiso, Emerson Cabrera and Teodoro, Douglas and Barra, Cl{\'a}udia Maria Cabral Moro", booktitle = "Proceedings of the 3rd Clinical Natural Language Processing Workshop", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.clinicalnlp-1.7", pages = "65--72", abstract = "With the growing number of electronic health record data, clinical NLP tasks have become increasingly relevant to unlock valuable information from unstructured clinical text. Although the performance of downstream NLP tasks, such as named-entity recognition (NER), in English corpus has recently improved by contextualised language models, less research is available for clinical texts in low resource languages. Our goal is to assess a deep contextual embedding model for Portuguese, so called BioBERTpt, to support clinical and biomedical NER. We transfer learned information encoded in a multilingual-BERT model to a corpora of clinical narratives and biomedical-scientific papers in Brazilian Portuguese. To evaluate the performance of BioBERTpt, we ran NER experiments on two annotated corpora containing clinical narratives and compared the results with existing BERT models. Our in-domain model outperformed the baseline model in F1-score by 2.72{\%}, achieving higher performance in 11 out of 13 assessed entities. We demonstrate that enriching contextual embedding models with domain literature can play an important role in improving performance for specific NLP tasks. The transfer learning process enhanced the Portuguese biomedical NER model by reducing the necessity of labeled data and the demand for retraining a whole new model.", } ``` ## Questions? Post a Github issue on the [BioBERTpt repo](https://github.com/HAILab-PUCPR/BioBERTpt).
3,390
[ [ -0.00891876220703125, -0.04815673828125, 0.0390625, 0.0189056396484375, -0.0229949951171875, -0.004718780517578125, -0.0229644775390625, -0.055816650390625, 0.0265960693359375, 0.040283203125, -0.0018310546875, -0.05670166015625, -0.05548095703125, 0.0169830...
tugstugi/bert-base-mongolian-cased
2021-05-20T08:12:07.000Z
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "mongolian", "cased", "mn", "arxiv:1810.04805", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
tugstugi
null
null
tugstugi/bert-base-mongolian-cased
0
469
transformers
2022-03-02T23:29:05
--- language: "mn" tags: - bert - mongolian - cased --- # BERT-BASE-MONGOLIAN-CASED [Link to Official Mongolian-BERT repo](https://github.com/tugstugi/mongolian-bert) ## Model description This repository contains pre-trained Mongolian [BERT](https://arxiv.org/abs/1810.04805) models trained by [tugstugi](https://github.com/tugstugi), [enod](https://github.com/enod) and [sharavsambuu](https://github.com/sharavsambuu). Special thanks to [nabar](https://github.com/nabar) who provided 5x TPUs. This repository is based on the following open source projects: [google-research/bert](https://github.com/google-research/bert/), [huggingface/pytorch-pretrained-BERT](https://github.com/huggingface/pytorch-pretrained-BERT) and [yoheikikuta/bert-japanese](https://github.com/yoheikikuta/bert-japanese). #### How to use ```python from transformers import pipeline, AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained('tugstugi/bert-base-mongolian-cased', use_fast=False) model = AutoModelForMaskedLM.from_pretrained('tugstugi/bert-base-mongolian-cased') ## declare task ## pipe = pipeline(task="fill-mask", model=model, tokenizer=tokenizer) ## example ## input_ = '[MASK] хот Монгол улсын нийслэл.' output_ = pipe(input_) for i in range(len(output_)): print(output_[i]) ## output ## # {'sequence': 'Улаанбаатар хот Монгол улсын нийслэл.', 'score': 0.826970100402832, 'token': 281, 'token_str': 'Улаанбаатар'} # {'sequence': 'Нийслэл хот Монгол улсын нийслэл.', 'score': 0.06551621109247208, 'token': 4059, 'token_str': 'Нийслэл'} # {'sequence': 'Эрдэнэт хот Монгол улсын нийслэл.', 'score': 0.0264141745865345, 'token': 2229, 'token_str': 'Эрдэнэт'} # {'sequence': 'Дархан хот Монгол улсын нийслэл.', 'score': 0.017083868384361267, 'token': 1646, 'token_str': 'Дархан'} # {'sequence': 'УБ хот Монгол улсын нийслэл.', 'score': 0.010854342952370644, 'token': 7389, 'token_str': 'УБ'} ``` ## Training data Mongolian Wikipedia and the 700 million word Mongolian news data set [[Pretraining Procedure](https://github.com/tugstugi/mongolian-bert#pre-training)] ### BibTeX entry and citation info ```bibtex @misc{mongolian-bert, author = {Tuguldur, Erdene-Ochir and Gunchinish, Sharavsambuu and Bataa, Enkhbold}, title = {BERT Pretrained Models on Mongolian Datasets}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/tugstugi/mongolian-bert/}} } ```
2,454
[ [ -0.02593994140625, -0.035430908203125, -0.004901885986328125, 0.0188751220703125, -0.037689208984375, 0.0005407333374023438, -0.021636962890625, -0.00421905517578125, 0.02435302734375, 0.0076446533203125, -0.04754638671875, -0.048980712890625, -0.046783447265625...
Crataco/AID-Neo-125M
2023-09-23T22:08:02.000Z
[ "transformers", "pytorch", "safetensors", "gpt_neo", "text-generation", "en", "license:mit", "endpoints_compatible", "region:us" ]
text-generation
Crataco
null
null
Crataco/AID-Neo-125M
1
469
transformers
2022-04-28T03:48:27
--- language: en license: mit pipeline_tag: text-generation --- # **UPDATE (2023-09-23):** This model is obsolete. Thanks to quantization you can run AI Dungeon 2 Classic (a 1.5B model) under equivalent hardware. [See here](https://huggingface.co/Crataco/ggml-ai-dungeon-2-classic). *** # AID-Neo-125M ## Model description This model was inspired by -- and finetuned on the same dataset of -- [KoboldAI's GPT-Neo-125M-AID (Mia) model](https://huggingface.co/KoboldAI/GPT-Neo-125M-AID): the AI Dungeon dataset (`text_adventures.txt`). This was to fix a possible oversight in the original model, which was trained with [an unfortunate bug](https://github.com/EricFillion/happy-transformer/issues/283). You could technically consider it a "retraining" of the same model using different software. ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 1 - eval_batch_size: 1 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3.0
1,064
[ [ -0.022674560546875, -0.046966552734375, 0.0272674560546875, -0.0018320083618164062, -0.02459716796875, -0.02996826171875, -0.00360107421875, -0.0208740234375, 0.0036830902099609375, 0.036590576171875, -0.06097412109375, -0.0148162841796875, -0.03326416015625, ...
NYTK/translation-nllb-200-3.3B-multi12-hungarian
2023-01-23T08:49:02.000Z
[ "transformers", "pytorch", "m2m_100", "text2text-generation", "translation", "hu", "bg", "cs", "de", "en", "hr", "pl", "ro", "ru", "sk", "sl", "sr", "uk", "license:cc-by-nc-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
translation
NYTK
null
null
NYTK/translation-nllb-200-3.3B-multi12-hungarian
1
469
transformers
2023-01-09T13:37:32
--- license: cc-by-nc-4.0 language: - hu - bg - cs - de - en - hr - pl - ro - ru - sk - sl - sr - uk tags: - translation metrics: - sacrebleu - chrf widget: - text: >- This may not make much sense to you, sir, but I'd like to ask your permission to date your daughter. --- # Hungarian-centered 12-lingual finetuned NLLB-200-3.3B model For further details, see or [our demo site](https://juniper.nytud.hu/demo/nlp). - Source language: Bulgarian (bg), Czech (cs), German (de), English (en), Croatian (hr), Polish, (pl), Romanian (ro), Russian (ru), Slovak (sk), Slovene (sl), Serbian (sr), Ukrainian (uk) - Target language: Hungarian (hu) - Finetuned on subcorpora from OPUS - Segments: 3 million per language ## Limitations - max_source_length: 256 - max_target_length: 256 ## Citation If you use this model, please cite the following paper: ``` @inproceedings {laki-yang-multi12, title = {Magyarcentrikus többnyelvű gépifordító rendszerek létrehozása}, booktitle = {XIX. Magyar Számítógépes Nyelvészeti Konferencia (MSZNY 2023)}, year = {2023}, publisher = {Szegedi Tudományegyetem, Informatikai Intézet}, address = {Szeged, Hungary}, author = {Laki, László János and Yang, Zijian Győző}, pages = {369--380} } ```
1,241
[ [ -0.025482177734375, -0.041534423828125, 0.0016689300537109375, 0.028900146484375, -0.0189208984375, -0.013916015625, -0.0360107421875, -0.0443115234375, 0.02947998046875, 0.0296630859375, -0.03680419921875, -0.038604736328125, -0.0226593017578125, 0.02725219...
girinlp-i2i/phibert-finetuned-ner
2023-02-08T07:33:15.000Z
[ "transformers", "pytorch", "tensorboard", "bert", "token-classification", "generated_from_trainer", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
girinlp-i2i
null
null
girinlp-i2i/phibert-finetuned-ner
1
469
transformers
2023-01-11T13:45:32
--- tags: - generated_from_trainer metrics: - precision - recall - f1 - accuracy model-index: - name: phibert-finetuned-ner 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. --> # phibert-finetuned-ner This model is a fine-tuned version of [dmis-lab/biobert-v1.1](https://huggingface.co/dmis-lab/biobert-v1.1) on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.0293 - Precision: 0.9238 - Recall: 0.9213 - F1: 0.9226 - Accuracy: 0.9950 ## 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: 8 - eval_batch_size: 8 - 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 | Precision | Recall | F1 | Accuracy | |:-------------:|:-----:|:-----:|:---------------:|:---------:|:------:|:------:|:--------:| | 0.0309 | 1.0 | 5728 | 0.0305 | 0.8977 | 0.9042 | 0.9009 | 0.9939 | | 0.0131 | 2.0 | 11456 | 0.0308 | 0.9089 | 0.9114 | 0.9102 | 0.9939 | | 0.008 | 3.0 | 17184 | 0.0293 | 0.9238 | 0.9213 | 0.9226 | 0.9950 | ### Framework versions - Transformers 4.26.0 - Pytorch 1.13.1+cu116 - Datasets 2.9.0 - Tokenizers 0.13.2
1,675
[ [ -0.034027099609375, -0.0299835205078125, 0.0186004638671875, 0.0113372802734375, -0.0211944580078125, -0.0250244140625, 0.002445220947265625, -0.0035858154296875, 0.020538330078125, 0.02337646484375, -0.053741455078125, -0.044647216796875, -0.0494384765625, ...