modelId
string
author
string
last_modified
timestamp[us, tz=UTC]
downloads
int64
likes
int64
library_name
string
tags
list
pipeline_tag
string
createdAt
timestamp[us, tz=UTC]
card
string
shanhy/xlmroberta_clir_seed33_back_translation_augmentation_val_kin
shanhy
2024-01-27T14:48:32Z
92
0
transformers
[ "transformers", "safetensors", "roberta", "text-classification", "generated_from_trainer", "base_model:FacebookAI/xlm-roberta-base", "base_model:finetune:FacebookAI/xlm-roberta-base", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-classification
2024-01-27T14:47:50Z
--- license: mit base_model: xlm-roberta-base tags: - generated_from_trainer model-index: - name: xlmroberta_clir_seed33_back_translation_augmentation_val_kin 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. --> # xlmroberta_clir_seed33_back_translation_augmentation_val_kin This model is a fine-tuned version of [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 0.0794 - Spearman Corr: 0.4875 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 128 - seed: 33 - gradient_accumulation_steps: 2 - total_train_batch_size: 64 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Spearman Corr | |:-------------:|:-----:|:----:|:---------------:|:-------------:| | No log | 0.49 | 200 | 0.1254 | 0.4101 | | No log | 0.97 | 400 | 0.0891 | 0.5281 | | No log | 1.46 | 600 | 0.0393 | 0.4545 | | No log | 1.95 | 800 | 0.0401 | 0.4953 | | 0.0423 | 2.43 | 1000 | 0.0515 | 0.4780 | | 0.0423 | 2.92 | 1200 | 0.0488 | 0.4551 | | 0.0423 | 3.41 | 1400 | 0.0794 | 0.4875 | ### Framework versions - Transformers 4.37.1 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
NbAiLabBeta/nb-whisper-tiny-verbatim
NbAiLabBeta
2024-01-27T14:40:53Z
14,420
0
transformers
[ "transformers", "pytorch", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-tiny", "base_model:quantized:openai/whisper-tiny", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-08T21:59:04Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-tiny tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # Finetuned Verbatim model. This model is trained 200 additional steps on top of the model below. This makes it outputting only text in lowercase and without punctation. It is also considerably more verbatim, and will not make any attempt at correcting grammatical errors in the text # NB-Whisper Tiny Verbatim (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Tiny Verbatim model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-tiny-verbatim") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-tiny/resolve/main/ggml-model.bin -O models/nb-tiny-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-tiny/resolve/main/ggml-model-q5_0.bin -O models/nb-tiny-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-tiny-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-tiny-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-tiny-verbatim --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Tiny Verbatim model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
alnrg2arg/test3_sft_4bit_dpo
alnrg2arg
2024-01-27T14:38:46Z
4
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "text-generation-inference", "unsloth", "trl", "conversational", "en", "dataset:Intel/orca_dpo_pairs", "base_model:alnrg2arg/blockchainlabs_7B_merged_test2_4", "base_model:finetune:alnrg2arg/blockchainlabs_7B_merged_test2_4", "license:cc-by-nc-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T14:30:04Z
--- language: - en license: cc-by-nc-4.0 tags: - text-generation-inference - transformers - unsloth - mistral - trl base_model: alnrg2arg/blockchainlabs_7B_merged_test2_4 datasets: - Intel/orca_dpo_pairs --- This is a model from blockchainlab test 2.4 - alnrg2arg/blockchainlabs_7B_merged_test2_4. The project is running to make a small LLM for a on-device purpose. Overall pipeline for this iteration is 1.Merging to make a base model (7B) 2.Prune the model to reduce the parameter (50% sparcity) 3.For recovery phase of the pruning, the DPO is chosen. This model which is not pruned is intended to compare with the pruned model. This is the code and parameters I chose for this model(DPO). ``` from transformers import TrainingArguments, AutoModelForCausalLM from trl import DPOTrainer dpo_trainer = DPOTrainer( model = model, ref_model = None, args = TrainingArguments( per_device_train_batch_size = 8, gradient_accumulation_steps = 8, warmup_ratio = 0.1, num_train_epochs = 3, learning_rate = 5e-6, fp16 = not torch.cuda.is_bf16_supported(), bf16 = torch.cuda.is_bf16_supported(), logging_steps = 1, optim = "adamw_8bit", weight_decay = 0.0, lr_scheduler_type = "linear", seed = 42, output_dir = "output_DPO", ), beta = 0.1, train_dataset = dataset, # eval_dataset = raw_datasets["test"], tokenizer = tokenizer, max_length = 1024, max_prompt_length = 512, ) ``` The code and parameters are borrowed from https://colab.research.google.com/drive/1SKrKGV-BZoU4kv5q3g0jtE_OhRgPtrrQ?usp=sharing
alnrg2arg/test3_sft_16bit_dpo
alnrg2arg
2024-01-27T14:37:21Z
0
0
transformers
[ "transformers", "safetensors", "text-generation-inference", "unsloth", "mistral", "trl", "en", "dataset:Intel/orca_dpo_pairs", "base_model:alnrg2arg/blockchainlabs_7B_merged_test2_4", "base_model:finetune:alnrg2arg/blockchainlabs_7B_merged_test2_4", "license:cc-by-nc-4.0", "endpoints_compatible", "region:us" ]
null
2024-01-27T14:21:22Z
--- language: - en license: cc-by-nc-4.0 tags: - text-generation-inference - transformers - unsloth - mistral - trl base_model: alnrg2arg/blockchainlabs_7B_merged_test2_4 datasets: - Intel/orca_dpo_pairs --- This is a model from blockchainlab test 2.4 - alnrg2arg/blockchainlabs_7B_merged_test2_4. The project is running to make a small LLM for a on-device purpose. Overall pipeline for this iteration is 1.Merging to make a base model (7B) 2.Prune the model to reduce the parameter (50% sparcity) 3.For recovery phase of the pruning, the DPO is chosen. This model which is not pruned is intended to compare with the pruned model. This is the code and parameters I chose for this model(DPO). ``` from transformers import TrainingArguments, AutoModelForCausalLM from trl import DPOTrainer dpo_trainer = DPOTrainer( model = model, ref_model = None, args = TrainingArguments( per_device_train_batch_size = 8, gradient_accumulation_steps = 8, warmup_ratio = 0.1, num_train_epochs = 3, learning_rate = 5e-6, fp16 = not torch.cuda.is_bf16_supported(), bf16 = torch.cuda.is_bf16_supported(), logging_steps = 1, optim = "adamw_8bit", weight_decay = 0.0, lr_scheduler_type = "linear", seed = 42, output_dir = "output_DPO", ), beta = 0.1, train_dataset = dataset, # eval_dataset = raw_datasets["test"], tokenizer = tokenizer, max_length = 1024, max_prompt_length = 512, ) ``` The code and parameters are borrowed from https://colab.research.google.com/drive/1SKrKGV-BZoU4kv5q3g0jtE_OhRgPtrrQ?usp=sharing
zjunlp/knowlm-13b-ie
zjunlp
2024-01-27T14:34:02Z
124
16
transformers
[ "transformers", "pytorch", "llama", "text-generation", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2023-08-06T04:49:33Z
- [1.与 knowlm-13b-zhixi 的区别](#1与-knowlm-13b-zhixi-的区别) - [📏 2.信息抽取模板](#-2信息抽取模板) - [3.常见的主题关系类型](#3常见的主题关系类型) - [4.现成数据集](#4现成数据集) - [5.转换脚本](#5转换脚本) - [6.使用](#6使用) - [7.评估](#7评估) # 1.与 knowlm-13b-zhixi 的区别 与 zjunlp/knowlm-13b-zhixi 相比,zjunlp/knowlm-13b-ie 在信息抽取方面表现出略强的实用性,但其一般适用性下降。 zjunlp/knowlm-13b-ie 从中英文信息抽取数据集中采样约 10% 的数据,然后进行负采样。例如,如果数据集 A 包含标签 [a,b,c,d,e,f],我们首先从 A 中采样出 10% 的数据。对于给定的样本 s,它可能只包含标签 a 和 b。我们随机地添加原本没有的关系,比如来自指定关系候选列表的 c 和 d。当遇到这些额外的关系时,模型可能会输出类似 'NAN' 的文本。这种方法使模型在一定程度上具备生成 'NAN' 输出的能力,增强了其信息抽取能力,但削弱了其泛化能力。 # 📏 2.信息抽取模板 模版`template`用于构造输入模型的**指令**`instruction`, 由三部分组成: 1. **任务描述**:明确模型的职能及其需完成的任务,例如实体识别、关系抽取、事件抽取等。 2. **候选标签列表{s_schema}(可选)**:定义模型需要提取的标签类别,如实体类型、关系类型、事件类型等。 3. **结构化输出格式{s_format}**:指明模型应如何呈现其抽取的结构化信息。 **指定候选标签列表**的模版: ``` 实体命名识别(NER): 你是专门进行实体抽取的专家。已知候选的实体类型列表:{s_schema},请你根据实体类型列表,从以下输入中抽取出可能存在的实体,如果不存在某实体就输出NAN。请按照{s_format}的格式回答。 关系抽取(RE): 你在这里扮演关系三元组识别师的角色。我将给你个输入,请根据关系列表:{s_schema},从输入中抽取出可能包含的关系三元组,,如果不存在某关系就输出NAN,并以{s_format}的形式回答。 事件抽取(EE): 你是专门进行事件提取的专家。已知候选的事件字典:{s_schema},请你根据事件字典,从以下输入中抽取出可能存在的事件,如果不存在某事件就输出NAN。请按照{s_format}的格式回答。 事件类型抽取(EET): 作为事件分析专员,你需要查看输入并根据事件类型名录:{s_schema},来确定可能发生的事件。所有回答都应该基于{s_format}格式。如果事件类型不匹配,请用NAN标记。 事件论元抽取(EEA): 你是专门进行事件论元提取的专家。已知事件字典:{s_schema1},事件类型及触发词:{s_schema2},请你从以下输入中抽取出可能存在的论元,如果不存在某事件论元就输出NAN。请按照{s_format}的格式回答。 ``` <details> <summary><b>不指定候选标签列表的模版</b></summary> ``` 实体命名识别(NER): 分析文本内容,并提取明显的实体。将您的发现以{s_format}格式提出,跳过任何不明显或不确定的部分。 关系抽取(RE): 请从文本中抽取出所有关系三元组,并根据{s_format}的格式呈现结果。忽略那些不符合标准关系模板的实体。 事件抽取(EE): 请分析下文,从中抽取所有可识别的事件,并按照指定的格式{s_format}呈现。如果某些信息不构成事件,请简单跳过。 事件类型抽取(EET): 审视下列文本内容,并抽取出任何你认为显著的事件。将你的发现整理成{s_format}格式提供。 事件论元抽取(EEA): 请您根据事件类型及触发词{s_schema2}从以下输入中抽取可能的论元。请按照{s_format}的格式回答。 ``` </details> <details> <summary><b>候选标签列表{s_schema}</b></summary> ```json NER(CLUE): ["书名", "地址", "电影", "公司", "姓名", "组织机构", "职位", "游戏", "景点", "政府"] RE(DuIE): ["创始人", "号", "注册资本", "出版社", "出品公司", "作词", "出生地", "连载网站", "祖籍", "制片人", "出生日期", "主演", "改编自", ...] EE(DuEE-fin): {"质押": ["披露时间", "质押物占总股比", "质押物所属公司", "质押股票/股份数量", "质押物", "质押方", "质押物占持股比", "质权方", "事件时间"], "股份回购": ["回购方", "回购完成时间", "披露时间", "每股交易价格", "交易金额", "回购股份数量", "占公司总股本比例"], ...} EET(DuEE): ["交往-感谢", "组织行为-开幕", "竞赛行为-退赛", "组织关系-加盟", "组织关系-辞/离职", "财经/交易-涨价", "人生-产子/女", "灾害/意外-起火", "组织关系-裁员", ...] EEA(DuEE-fin): {"质押": ["披露时间", "质押物占总股比", "质押物所属公司", "质押股票/股份数量", "质押物", "质押方", "质押物占持股比", "质权方", "事件时间"], "股份回购": ["回购方", "回购完成时间", "披露时间", "每股交易价格", "交易金额", "回购股份数量", "占公司总股本比例"], ...} ``` </details> <details> <summary><b>结构输出格式{s_format}</b></summary> ``` 实体命名识别(NER): (实体,实体类型) 关系抽取(RE): (头实体,关系,尾实体) 事件抽取(EE): (事件触发词,事件类型,事件论元1#论元角色1;事件论元2#论元角色2) 事件类型抽取(EET): (事件触发词,事件类型) 事件论元抽取(EEA): (Event Trigger,Event Type,Argument1#Argument Role1;Argument2#Argument Role2) ``` </details> 这些模板中的schema({s_schema})和结构输出格式({s_format})占位符被嵌入在模板中,用户必须指定。 有关模板的更全面理解,请参阅配置目录[configs](https://github.com/zjunlp/DeepKE/tree/main/example/llm/InstructKGC/configs) 和 文件[ner_converter.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert/converter/ner_converter.py)、[re_converter.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert/converter/re_converter.py)、[ee_converter.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert/converter/ee_converter.py)、[eet_converter.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert/converter/eet_converter.py)、[eea_converter.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert/converter/eea_converter.py) . # 3.常见的主题关系类型 ```python wiki_cate_schema_zh = { '人物': ['出生地点', '出生日期', '国籍', '职业', '作品', '成就', '籍贯', '职务', '配偶', '父母', '别名', '所属组织', '死亡日期', '兄弟姊妹', '墓地'], '地理地区': ['位于', '别名', '人口', '行政中心', '面积', '成就', '长度', '宽度', '海拔'], '建筑': ['位于', '别名', '成就', '事件', '创建时间', '宽度', '长度', '创建者', '高度', '面积', '名称由来'], '作品': ['作者', '出版时间', '别名', '产地', '改编自', '演员', '出版商', '成就', '表演者', '导演', '制片人', '编剧', '曲目', '作曲者', '作词者', '制作商', '票房', '出版平台'], '生物': ['分布', '父级分类单元', '长度', '主要食物来源', '别名', '学名', '重量', '宽度', '高度'], '人造物件': ['别名', '品牌', '生产时间', '材料', '产地', '用途', '制造商', '发现者或发明者'], '自然科学': ['别名', '性质', '组成', '生成物', '用途', '产地', '发现者或发明者'], '组织': ['位于', '别名', '子组织', '成立时间', '产品', '成就', '成员', '创始人', '解散时间', '事件'], '运输': ['位于', '创建时间', '线路', '开通时间', '途经', '面积', '别名', '长度', '宽度', '成就', '车站等级'], '事件': ['参与者', '发生地点', '发生时间', '别名', '赞助者', '伤亡人数', '起因', '导致', '主办方', '所获奖项', '获胜者'], '天文对象': ['别名', '属于', '发现或发明时间', '发现者或发明者', '名称由来', '绝对星等', '直径', '质量'], '医学': ['症状', '别名', '发病部位', '可能后果', '病因'] } ``` 此处 [schema](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/schema.py) 提供了12种文本主题, 以及该主题下常见的关系类型。 # 4.转换脚本 **训练数据转换** 在对模型进行数据输入之前,需要将**数据格式化**以包含`instruction`和`input`字段。为此,我们提供了一个脚本 [kg2instruction/convert.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert.py),它可以将数据批量转换成模型可以直接使用的格式。 > 在使用 [kg2instruction/convert.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert.py) 脚本之前,请确保参考了 [data](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/data) 目录。该目录详细说明了每种任务所需的数据格式要求。请参考 sample.json 以了解转换前数据的格式,schema.json 则展示了 schema 的组织结构,而 processed.json 则描述了转换后的数据格式。 ```bash python kg2instruction/convert.py \ --src_path data/NER/sample.json \ --tgt_path data/NER/processed.json \ --schema_path data/NER/schema.json \ --language zh \ # 不同语言使用的template及转换脚本不同 --task NER \ # ['RE', 'NER', 'EE', 'EET', 'EEA'] 5种任务 --sample -1 \ # 若为-1, 则从20种指令和4种输出格式中随机采样其中一种, 否则即为指定的指令格式, -1<=sample<20 --neg_ratio 1 \ # 表示所有样本的负采样比例 --neg_schema 1 \ # 表示从schema中负采样的比例 --random_sort # 是否对指令中的schema列表进行随机排序 ``` **负采样**: 假设数据集 A 包含标签 [a,b,c,d,e,f],对于某个给定的样本 s,它可能仅涉及标签 a 和 b。我们的目标是随机从候选关系列表中引入一些原本与 s 无关的关系,比如 c 和 d。然而,值得注意的是,在输出中,c 和 d 的标签要么不被输出,要么输出为`NAN`。 `schema_path`指定schema文件(json文件)路径, schema文件共包含3行json字符串, 以固定的格式组织schema信息。这里以NER任务为例, 每行的含义如下: ``` ["书名", "地址", "电影", ...] # 实体类型列表 [] # 空列表 {} # 空字典 ``` <details> <summary><b>更多</b></summary> ``` 对于关系抽取(RE)任务 [] # 空列表 ["创始人", "号", "注册资本",...] # 关系类型列表 {} # 空字典 对于事件抽取(EE)任务 ["交往-感谢", "组织行为-开幕", "竞赛行为-退赛", ...] # 事件类型列表 ["解雇方", "解约方", "举报发起方", "被拘捕者"] # 论元角色列表 {"组织关系-裁员": ["裁员方", "裁员人数", "时间"], "司法行为-起诉": ["原告", "被告", "时间"], ...} # 事件类型字典 对于事件类型抽取(EET)任务 ["交往-感谢", "组织行为-开幕", "竞赛行为-退赛", ...] # 事件类型列表 [] # 空列表 {} # 空字典 对于事件论元抽取(EEA)任务 ["交往-感谢", "组织行为-开幕", "竞赛行为-退赛", ...] # 事件类型列表 ["解雇方", "解约方", "举报发起方", "被拘捕者"] # 论元角色列表 {"组织关系-裁员": ["裁员方", "裁员人数", "时间"], "司法行为-起诉": ["原告", "被告", "时间"], ...} # 事件类型字典 ``` </details> 更详细的schema文件信息可在[data](./data)目录下各个任务目录的`schema.json`文件中查看。 **测试数据转换** 对于**测试数据**,可以使用 [kg2instruction/convert_test.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/convert_test.py) 脚本,它不要求数据包含标签(`entity`、`relation`、`event`)字段,**只需**提供`input`字段和相应的`schema_path`。 ```bash python kg2instruction/convert_test.py \ --src_path data/NER/sample.json \ --tgt_path data/NER/processed.json \ --schema_path data/NER/schema.json \ --language zh \ --task NER \ --sample 0 ``` **数据转换实例** 以下是一个实体识别(NER)任务数据转换的示例: ```json 转换前: { "input": "相比之下,青岛海牛队和广州松日队的雨中之战虽然也是0∶0,但乏善可陈。", "entity": [{"entity": "广州松日队", "entity_type": "组织机构"}, {"entity": "青岛海牛队", "entity_type": "组织机构"}] } 转换后: { "id": "e88d2b42f8ca14af1b77474fcb18671ed3cacc0c75cf91f63375e966574bd187", "instruction": "请在所给文本中找出并列举['组织机构', '人物', '地理位置']提及的实体类型,不存在的类型请注明为NAN。回答应按(实体,实体类型)\n格式进行。", "input": "相比之下,青岛海牛队和广州松日队的雨中之战虽然也是0∶0,但乏善可陈。", "output": "(青岛海牛队,组织机构)\n(广州松日队,组织机构)\nNAN\nNAN" } ``` 转换前: 数据的格式需要符合 `DeepKE/example/llm/InstructKGC/data` 目录下为各项任务(如NER、RE、EE等)规定的结构。以NER任务为例,输入文本应标记为`input`字段,而标注数据则应标记为`entity`字段,它是一个包含多个`entity`和`entity_type`键值对的字典列表。 转换后: 将得到包含`input`文本、`instruction`指令(详细说明了候选标签列表['组织机构', '人物', '地理位置']和期望的输出格式(实体,实体类型)),以及`output`(以(实体,实体类型)形式列出在`input`中识别到的所有实体信息)的结构化数据。 <details> <summary><b>更多</b></summary> - 转换前 ``` 关系抽取(RE): { "input": "如何演好自己的角色,请读《演员自我修养》《喜剧之王》周星驰崛起于穷困潦倒之中的独门秘笈", "relation": [{"head": "喜剧之王", "relation": "主演", "tail": "周星驰"}] } 事件抽取(EE): { "input": "消失的“外企光环”,5月份在华裁员900余人,香饽饽变“臭”了", "event": [{"event_trigger": "裁员", "event_type": "组织关系-裁员", "arguments": [{"argument": "900余人", "role": "裁员人数"}, {"argument": "5月份", "role": "时间"}]}] } 事件类型抽取(EET): { "input": "前两天,被称为 “ 仅次于苹果的软件服务商 ” 的 Oracle( 甲骨文 )公司突然宣布在中国裁员。。", "event": [{"event_trigger": "裁员", "event_type": "组织关系-裁员", "arguments": [{"argument": "前两天", "role": "时间"}, {"argument": "被称为 “ 仅次于苹果的软件服务商 ” 的 Oracle( 甲骨文 )公司", "role": "裁员方"}]}] } 事件论元抽取(EEA): { "input": "不仅仅是中国IT企业在裁员,为何500强的甲骨文也发生了全球裁员", "event": [{"event_trigger": "裁员", "event_type": "组织关系-裁员", "arguments": [{"argument": "中国IT企业", "role": "裁员方"}]}, {"event_trigger": "裁员", "event_type": "组织关系-裁员", "arguments": [{"argument": "500强的甲骨文", "role": "裁员方"}]}] } ``` - 转换后 ``` 关系抽取(RE): { "id": "5526d8aa9520a0feaa045ae41d347cf7ca48bd84385743ed453ea57dbe743c7c", "instruction": "你是专门进行关系三元组提取的专家。已知候选的关系列表:['丈夫', '出版社', '导演', '主演', '注册资本', '编剧', '人口数量', '成立日期', '作曲', '嘉宾', '海拔', '作词', '身高', '出品公司', '占地面积', '母亲'],请你根据关系列表,从以下输入中抽取出可能存在的头实体与尾实体,并给出对应的关系三元组,如果不存在某关系就输出NAN。请按照(头实体,关系,尾实体)\n的格式回答。", "input": "如何演好自己的角色,请读《演员自我修养》《喜剧之王》周星驰崛起于穷困潦倒之中的独门秘笈", "output": "NAN\nNAN\nNAN\n(喜剧之王,主演,周星驰)\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN" } 事件抽取(EE): { "id": "f4dcda5576849c77df664c9318d136c36a663f11ad8af98e2794b113884fa69c", "instruction": "你是专门进行事件提取的专家。已知候选的事件字典:{'人生-婚礼': ['时间', '参礼人员', '地点', '结婚双方'], '组织关系-停职': ['所属组织', '停职人员', '时间'], '交往-会见': ['时间', '会见主体', '地点', '会见对象'], '组织关系-解约': ['时间', '被解约方', '解约方'], '组织行为-开幕': ['时间', '地点', '活动名称'], '人生-求婚': ['时间', '求婚对象', '求婚者'], '人生-失联': ['失联者', '时间', '地点'], '产品行为-发布': ['时间', '发布方', '发布产品'], '灾害/意外-洪灾': ['时间', '受伤人数', '地点', '死亡人数'], '产品行为-上映': ['时间', '上映方', '上映影视'], '组织行为-罢工': ['所属组织', '罢工人数', '时间', '罢工人员'], '人生-怀孕': ['时间', '怀孕者'], '灾害/意外-起火': ['时间', '受伤人数', '地点', '死亡人数'], '灾害/意外-车祸': ['时间', '受伤人数', '地点', '死亡人数'], '司法行为-开庭': ['时间', '开庭法院', '开庭案件'], '交往-探班': ['探班主体', '时间', '探班对象'], '竞赛行为-退役': ['时间', '退役者'], '组织关系-裁员': ['时间', '裁员人数'], '财经/交易-出售/收购': ['时间', '收购方', '交易物', '出售价格', '出售方'], '组织关系-退出': ['退出方', '时间', '原所属组织'], '竞赛行为-禁赛': ['时间', '被禁赛人员', '禁赛机构', '禁赛时长']},请你根据事件字典,从以下输入中抽取出可能存在的事件,如果不存在某事件就输出NAN。请按照(事件触发词,事件类型,事件论元1#论元角色1;事件论元2#论元角色2)\n的格式回答。", "input": "消失的“外企光环”,5月份在华裁员900余人,香饽饽变“臭”了", "output": "NAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\n(裁员,组织关系-裁员,时间#5月份;裁员人数#900余人)\nNAN\nNAN\nNAN" } 事件类型抽取(EET): { "id": "17aae856c45d7c75f1850d358dc81268a2a9604dce3b98865b3896d0f37a49ef", "instruction": "作为事件分析专员,你需要查看输入并根据事件类型名录:['人生-订婚', '灾害/意外-坍/垮塌', '财经/交易-涨价', '组织行为-游行', '组织关系-辞/离职', '交往-会见', '人生-结婚', '竞赛行为-禁赛', '组织关系-裁员', '灾害/意外-袭击', '司法行为-约谈', '人生-婚礼', '竞赛行为-退役', '人生-离婚', '灾害/意外-地震', '财经/交易-跌停', '产品行为-发布', '人生-求婚', '人生-怀孕', '组织关系-解约', '财经/交易-降价'],来确定可能发生的事件。所有回答都应该基于(事件触发词,事件类型)\n格式。如果事件类型不匹配,请用NAN标记。", "input": "前两天,被称为 “ 仅次于苹果的软件服务商 ” 的 Oracle( 甲骨文 )公司突然宣布在中国裁员。。", "output": "NAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\n(裁员,组织关系-裁员)\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN\nNAN" } 事件论元抽取(EEA): { "id": "5079d3cb44e94ca9b0749e687b1b19edc94b60fc2c1eb97b2154bbeb93ad3955", "instruction": "你是专门进行事件论元提取的专家。已知事件字典:{'组织关系-裁员': ['裁员方']},事件类型及触发词:[{'event_type': '组织关系-裁员', 'event_trigger': '裁员'}],请你从以下输入中抽取出可能存在的论元,如果不存在某事件论元就输出NAN。请按照(事件触发词,事件类型,事件论元1#论元角色1;事件论元2#论元角色2)\n的格式回答。", "input": "不仅仅是中国IT企业在裁员,为何500强的甲骨文也发生了全球裁员", "output": "(裁员,组织关系-裁员,裁员方#中国IT企业)\n(裁员,组织关系-裁员,裁员方#500强的甲骨文)" } ``` </details> # 5.使用 我们提供了可直接使用 `zjunlp/knowlm-13b-ie` 模型进行推理的脚本[inference.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/src/inference.py), 请参考 [README.md](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/README.md) 配置环境等。 ```bash CUDA_VISIBLE_DEVICES="0" python src/inference.py \ --model_name_or_path 'models/knowlm-13b-ie' \ --model_name 'llama' \ --input_file 'data/NER/processed.json' \ --output_file 'results/ner_test.json' \ --fp16 \ --bits 4 ``` 如果GPU显存不足够, 可以采用 `--bits 8` 或 `--bits 4` # 6.评估 我们提供一个位于 [evaluate.py](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/kg2instruction/evaluate.py) 的脚本,用于将模型的字符串输出转换为列表并计算 F1 分数。 ```bash python kg2instruction/evaluate.py \ --standard_path data/NER/processed.json \ --submit_path data/NER/processed.json \ --task ner \ --language zh ```
bmd1905/bert-finetuned-squad
bmd1905
2024-01-27T14:21:40Z
100
0
transformers
[ "transformers", "tensorboard", "safetensors", "bert", "question-answering", "generated_from_trainer", "base_model:google-bert/bert-base-cased", "base_model:finetune:google-bert/bert-base-cased", "license:apache-2.0", "endpoints_compatible", "region:us" ]
question-answering
2024-01-27T12:08:50Z
--- license: apache-2.0 base_model: bert-base-cased tags: - generated_from_trainer model-index: - name: bert-finetuned-squad 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. --> # bert-finetuned-squad This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on an unknown dataset. ## 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 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
mesolitica/mistral-embedding-191m-8k-contrastive
mesolitica
2024-01-27T14:19:32Z
107
0
transformers
[ "transformers", "safetensors", "mistral", "feature-extraction", "custom_code", "ms", "text-generation-inference", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
feature-extraction
2023-12-04T02:52:23Z
--- language: - ms --- # 191M 8192 context length Mistral on Malaysian text embedding task using contrastive loss Trained on truncated 8k context length. README at https://github.com/mesolitica/llm-embedding#finetune WandB, https://wandb.ai/mesolitica/mistral-embedding-191m-contrastive WandB report, https://wandb.ai/mesolitica/llama2-embedding-600m-contrastive/reports/Contrastive-embedding-loss--Vmlldzo2MTM4ODE0 ## how-to ```python from transformers import AutoModel, AutoTokenizer from sklearn.metrics.pairwise import cosine_similarity tokenizer = AutoTokenizer.from_pretrained("mesolitica/mistral-embedding-191m-8k-contrastive", trust_remote_code=True) model = AutoModel.from_pretrained("mesolitica/mistral-embedding-191m-8k-contrastive", trust_remote_code=True) input_ids = tokenizer( [ 'tak suka ayam', 'Isu perkauman: Kerajaan didakwa terdesak kaitkan pemimpin PN', 'nasi ayam tu sedap', 'suka ikan goreng?', 'Kerajaan tidak akan berkompromi dengan isu perkauman dan agama yang dimanipulasi pihak tertentu untuk mengganggu-gugat kestabilan negara serta ketenteraman rakyat.', 'rasis bodo mamat tu', 'kerajaan sekarang xde otak', 'aku nak sukan olimpik ni', 'malaysia dapat x pingat kt sukan asia?', 'pingat gangsa menerusi terjun dan olahraga pada hari ke-10', 'Kerajaan negeri kini dibenarkan melaksanakan penerokaan awal unsur nadir bumi (REE) berdasarkan prosedur operasi standard (SOP) sedia ada untuk perlombongan nadir bumi dan mineral.', 'KONTINJEN Malaysia mendekati sasaran 27 pingat di Sukan Asia kali ini esok, selepas menuai dua lagi pingat gangsa menerusi terjun dan olahraga pada hari ke-10 pertandingan, pada Selasa.' ], return_tensors = 'pt', padding = True ) v = model.encode(input_ids).detach().numpy() v.shape ``` ``` (12, 768) ```
jordip/mistral7b_instruct_generation
jordip
2024-01-27T14:19:03Z
0
0
peft
[ "peft", "tensorboard", "safetensors", "trl", "sft", "generated_from_trainer", "dataset:generator", "base_model:mistralai/Mistral-7B-v0.1", "base_model:adapter:mistralai/Mistral-7B-v0.1", "license:apache-2.0", "region:us" ]
null
2024-01-27T14:18:48Z
--- license: apache-2.0 library_name: peft tags: - trl - sft - generated_from_trainer datasets: - generator base_model: mistralai/Mistral-7B-v0.1 model-index: - name: mistral7b_instruct_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. --> # mistral7b_instruct_generation This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on the generator dataset. It achieves the following results on the evaluation set: - Loss: 1.7925 ## 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.0002 - train_batch_size: 4 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: constant - lr_scheduler_warmup_steps: 0.03 - training_steps: 500 ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:----:|:---------------:| | 1.9057 | 0.0 | 20 | 1.8347 | | 1.8154 | 0.01 | 40 | 1.8032 | | 1.8779 | 0.01 | 60 | 1.7908 | | 1.9543 | 0.01 | 80 | 1.7954 | | 1.853 | 0.01 | 100 | 1.7956 | | 1.8104 | 0.02 | 120 | 1.7903 | | 1.9193 | 0.02 | 140 | 1.7942 | | 1.8547 | 0.02 | 160 | 1.7943 | | 1.858 | 0.03 | 180 | 1.7897 | | 1.7768 | 0.03 | 200 | 1.7975 | | 1.8016 | 0.03 | 220 | 1.7935 | | 1.8096 | 0.03 | 240 | 1.7982 | | 1.8556 | 0.04 | 260 | 1.7992 | | 1.927 | 0.04 | 280 | 1.8015 | | 1.8626 | 0.04 | 300 | 1.7930 | | 1.943 | 0.04 | 320 | 1.7939 | | 1.8699 | 0.05 | 340 | 1.7935 | | 1.8069 | 0.05 | 360 | 1.7944 | | 1.8291 | 0.05 | 380 | 1.7955 | | 1.774 | 0.06 | 400 | 1.7886 | | 1.8625 | 0.06 | 420 | 1.7955 | | 1.842 | 0.06 | 440 | 1.7961 | | 1.8625 | 0.06 | 460 | 1.8056 | | 1.9721 | 0.07 | 480 | 1.7930 | | 1.7607 | 0.07 | 500 | 1.7925 | ### Framework versions - PEFT 0.7.1 - Transformers 4.37.1 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
NbAiLabBeta/nb-whisper-medium-verbatim
NbAiLabBeta
2024-01-27T14:17:38Z
43
1
transformers
[ "transformers", "pytorch", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-medium", "base_model:quantized:openai/whisper-medium", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-11T11:06:11Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-medium tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # Finetuned Verbatim model. This model is trained 200 additional steps on top of the model below. This makes it outputting only text in lowercase and without punctation. It is also considerably more verbatim, and will not make any attempt at correcting grammatical errors in the text # NB-Whisper Medium Verbatim (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Medium Verbatim model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-medium-verbatim") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-medium/resolve/main/ggml-model.bin -O models/nb-medium-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-medium/resolve/main/ggml-model-q5_0.bin -O models/nb-medium-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-medium-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-medium-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-medium-verbatim --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Medium Verbatim model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
Virajtharinda/SinhalaMLM
Virajtharinda
2024-01-27T14:14:05Z
168
0
transformers
[ "transformers", "safetensors", "roberta", "fill-mask", "si", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
2024-01-27T11:13:54Z
--- license: mit language: - si ---
LoneStriker/WestLake-7B-v2-laser-GGUF
LoneStriker
2024-01-27T14:10:34Z
6
4
null
[ "gguf", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
2024-01-27T13:53:32Z
--- license: apache-2.0 --- by David, Fernando and Eric Sponsored by: [VAGO Solutions](https://vago-solutions.de) and [HyperSpace.Ai](https://hyperspace.computer/) Join our Discord! https://discord.gg/vT3sktQ3zb A laser version of [senseable/WestLake-7B-v2](https://huggingface.co/senseable/WestLake-7B-v2) It follows the implementation of laserRMT @ https://github.com/cognitivecomputations/laserRMT Here, we are controlling layers checking which ones have lower signal to noise ratios (which are more subject to noise), to apply Laser interventions, still using Machenko Pastur to calculate this ratio. We intend to be the first of a family of experimentations being carried out @ Cognitive Computations.
xezpeleta/latxa-7b-instruct
xezpeleta
2024-01-27T14:08:25Z
1
0
peft
[ "peft", "safetensors", "gguf", "llama", "latxa", "sft", "instruct", "chat", "text-generation", "eu", "dataset:xezpeleta/oasst2_eu", "base_model:HiTZ/latxa-7b-v1", "base_model:adapter:HiTZ/latxa-7b-v1", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T12:10:20Z
--- library_name: peft base_model: HiTZ/latxa-7b-v1 datasets: - xezpeleta/oasst2_eu language: - eu pipeline_tag: text-generation tags: - latxa - sft - instruct - chat --- # Latxa 7b Instruct Latxa 7b Instruct is an instruction fine-tuned model based on [HiTZ/latxa-7b-v1](https://huggingface.co/HiTZ/latxa-7b-v1) model. It has been fine-tuned using OASST2 dataset (OpenAssistant), translated to basque using Helsinki-NLP Opus MT
alnrg2arg/test3_sft_4bit
alnrg2arg
2024-01-27T14:04:27Z
8
1
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "text-generation-inference", "unsloth", "trl", "conversational", "en", "dataset:Open-Orca/SlimOrca", "base_model:alnrg2arg/blockchainlabs_7B_merged_test2_4", "base_model:finetune:alnrg2arg/blockchainlabs_7B_merged_test2_4", "license:cc-by-nc-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-generation
2024-01-26T17:35:22Z
--- language: - en license: cc-by-nc-4.0 tags: - text-generation-inference - transformers - unsloth - mistral - trl base_model: alnrg2arg/blockchainlabs_7B_merged_test2_4 datasets: - Open-Orca/SlimOrca --- Benchmark Scores | Tasks |Version|Filter|n-shot| Metric |Value | |Stderr| |-------------|------:|------|-----:|--------|-----:|---|-----:| |arc_challenge| 1|none | 0|acc |0.5247|± |0.0146| | | |none | 0|acc_norm|0.5623|± |0.0145| | Tasks |Version|Filter|n-shot| Metric |Value | |Stderr| |---------|------:|------|-----:|--------|-----:|---|-----:| |hellaswag| 1|none | 0|acc |0.6270|± |0.0048| | | |none | 0|acc_norm|0.8228|± |0.0038| | Groups |Version|Filter|n-shot|Metric|Value | |Stderr| |------------------|-------|------|-----:|------|-----:|---|-----:| |mmlu |N/A |none | 0|acc |0.6243|± |0.1341| | - humanities |N/A |none | 0|acc |0.5717|± |0.1400| | - other |N/A |none | 0|acc |0.7016|± |0.1143| | - social_sciences|N/A |none | 0|acc |0.7342|± |0.0753| | - stem |N/A |none | 0|acc |0.5192|± |0.1257| | Tasks |Version|Filter|n-shot|Metric|Value | |Stderr| |----------|------:|------|-----:|------|-----:|---|-----:| |winogrande| 1|none | 0|acc |0.7774|± |0.0117| |Tasks|Version| Filter |n-shot| Metric |Value | |Stderr| |-----|------:|----------|-----:|-----------|-----:|---|-----:| |gsm8k| 2|get-answer| 5|exact_match|0.6732|± |0.0129| | Tasks |Version|Filter|n-shot|Metric|Value | |Stderr| |--------------|------:|------|-----:|------|-----:|---|-----:| |truthfulqa_mc2| 2|none | 0|acc |0.4795|± |0.0148| Average 65.658
NbAiLabBeta/nb-whisper-medium
NbAiLabBeta
2024-01-27T13:58:36Z
281
0
transformers
[ "transformers", "pytorch", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-medium", "base_model:quantized:openai/whisper-medium", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-07T21:32:42Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-medium tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # NB-Whisper Medium (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Medium model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-medium") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-medium/resolve/main/ggml-model.bin -O models/nb-medium-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-medium/resolve/main/ggml-model-q5_0.bin -O models/nb-medium-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-medium-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-medium-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-medium --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Medium model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
GunaKoppula/Llava-Phi2
GunaKoppula
2024-01-27T13:55:47Z
29
0
transformers
[ "transformers", "safetensors", "llava_phi", "text-generation", "visual-question-answering", "en", "dataset:liuhaotian/LLaVA-Instruct-150K", "dataset:liuhaotian/LLaVA-Pretrain", "arxiv:2401.02330", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us" ]
visual-question-answering
2024-01-27T11:57:59Z
--- license: mit datasets: - liuhaotian/LLaVA-Instruct-150K - liuhaotian/LLaVA-Pretrain language: - en pipeline_tag: visual-question-answering --- # Model Card for Model ID This is a multimodal implementation of [Phi2](https://huggingface.co/microsoft/phi-2) model inspired by [LlaVA-Phi](https://github.com/zhuyiche/llava-phi). ## Model Details 1. LLM Backbone: [Phi2](https://huggingface.co/microsoft/phi-2) 2. Vision Tower: [clip-vit-large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) 4. Pretraining Dataset: [LAION-CC-SBU dataset with BLIP captions(200k samples)](https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain) 5. Finetuning Dataset: [Instruct 150k dataset based on COCO](https://huggingface.co/datasets/liuhaotian/LLaVA-Instruct-150K) 6. Finetuned Model: [GunaKoppula/Llava-Phi2](https://huggingface.co/GunaKoppula/Llava-Phi2) ### Model Sources <!-- Provide the basic links for the model. --> - **Original Repository:** [Llava-Phi](https://github.com/zhuyiche/llava-phi) - **Paper [optional]:** [LLaVA-Phi: Efficient Multi-Modal Assistant with Small Language Model](https://arxiv.org/pdf/2401.02330) - **Demo [optional]:** [Demo Link](https://huggingface.co/spaces/RaviNaik/MultiModal-Phi2) ## How to Get Started with the Model Use the code below to get started with the model. 1. Clone this repository and navigate to llava-phi folder ```bash git clone https://github.com/zhuyiche/llava-phi.git cd llava-phi ``` 2. Install Package ```bash conda create -n llava_phi python=3.10 -y conda activate llava_phi pip install --upgrade pip # enable PEP 660 support pip install -e . ``` 3. Run the Model ```bash python llava_phi/eval/run_llava_phi.py --model-path="GunaKoppula/Llava-Phi2" \ --image-file="https://huggingface.co/GunaKoppula/Llava-Phi2/resolve/main/people.jpg?download=true" \ --query="How many people are there in the image?" ``` ### Acknowledgement This implementation is based on wonderful work done by: \ [LlaVA-Phi](https://github.com/zhuyiche/llava-phi) \ [Llava](https://github.com/haotian-liu/LLaVA) \ [Phi2](https://huggingface.co/microsoft/phi-2)
LoneStriker/WestLake-7B-v2-laser-8.0bpw-h8-exl2
LoneStriker
2024-01-27T13:53:30Z
8
1
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T13:50:28Z
--- license: apache-2.0 --- by David, Fernando and Eric Sponsored by: [VAGO Solutions](https://vago-solutions.de) and [HyperSpace.Ai](https://hyperspace.computer/) Join our Discord! https://discord.gg/vT3sktQ3zb A laser version of [senseable/WestLake-7B-v2](https://huggingface.co/senseable/WestLake-7B-v2) It follows the implementation of laserRMT @ https://github.com/cognitivecomputations/laserRMT Here, we are controlling layers checking which ones have lower signal to noise ratios (which are more subject to noise), to apply Laser interventions, still using Machenko Pastur to calculate this ratio. We intend to be the first of a family of experimentations being carried out @ Cognitive Computations.
LoneStriker/WestLake-7B-v2-laser-6.0bpw-h6-exl2
LoneStriker
2024-01-27T13:50:26Z
6
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T13:48:02Z
--- license: apache-2.0 --- by David, Fernando and Eric Sponsored by: [VAGO Solutions](https://vago-solutions.de) and [HyperSpace.Ai](https://hyperspace.computer/) Join our Discord! https://discord.gg/vT3sktQ3zb A laser version of [senseable/WestLake-7B-v2](https://huggingface.co/senseable/WestLake-7B-v2) It follows the implementation of laserRMT @ https://github.com/cognitivecomputations/laserRMT Here, we are controlling layers checking which ones have lower signal to noise ratios (which are more subject to noise), to apply Laser interventions, still using Machenko Pastur to calculate this ratio. We intend to be the first of a family of experimentations being carried out @ Cognitive Computations.
ChikeJ/Taxi-v3
ChikeJ
2024-01-27T13:50:23Z
0
0
null
[ "Taxi-v3", "q-learning", "reinforcement-learning", "custom-implementation", "model-index", "region:us" ]
reinforcement-learning
2024-01-27T13:48:18Z
--- tags: - Taxi-v3 - q-learning - reinforcement-learning - custom-implementation model-index: - name: Taxi-v3 results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: Taxi-v3 type: Taxi-v3 metrics: - type: mean_reward value: 7.56 +/- 2.71 name: mean_reward verified: false --- # **Q-Learning** Agent playing1 **Taxi-v3** This is a trained model of a **Q-Learning** agent playing **Taxi-v3** . ## Usage ```python model = load_from_hub(repo_id="ChikeJ/Taxi-v3", filename="q-learning.pkl") # Don't forget to check if you need to add additional attributes (is_slippery=False etc) env = gym.make(model["env_id"]) ```
AmrutaMuthal/mero_controlnet_lr1
AmrutaMuthal
2024-01-27T13:49:46Z
2
0
diffusers
[ "diffusers", "tensorboard", "safetensors", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "controlnet", "base_model:runwayml/stable-diffusion-v1-5", "base_model:adapter:runwayml/stable-diffusion-v1-5", "license:creativeml-openrail-m", "region:us" ]
text-to-image
2024-01-27T10:55:52Z
--- license: creativeml-openrail-m base_model: runwayml/stable-diffusion-v1-5 tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - controlnet inference: true --- # controlnet-AmrutaMuthal/mero_controlnet_lr1 These are controlnet weights trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.
muzammil-eds/tinyllama-3T-128k-JsonExtract-v0.2
muzammil-eds
2024-01-27T13:45:11Z
0
0
transformers
[ "transformers", "safetensors", "unsloth", "arxiv:1910.09700", "endpoints_compatible", "region:us" ]
null
2024-01-27T13:45:04Z
--- library_name: transformers tags: - unsloth --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
stablediffusionapi/omnium-sdxl
stablediffusionapi
2024-01-27T13:41:26Z
30
3
diffusers
[ "diffusers", "modelslab.com", "stable-diffusion-api", "text-to-image", "ultra-realistic", "license:creativeml-openrail-m", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionXLPipeline", "region:us" ]
text-to-image
2024-01-27T13:38:35Z
--- license: creativeml-openrail-m tags: - modelslab.com - stable-diffusion-api - text-to-image - ultra-realistic pinned: true --- # Omnium SDXL API Inference ![generated from modelslab.com](https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/9421331991706362545.png) ## Get API Key Get API key from [ModelsLab API](http://modelslab.com), No Payment needed. Replace Key in below code, change **model_id** to "omnium-sdxl" Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://modelslab.com/docs) Try model for free: [Generate Images](https://modelslab.com/models/omnium-sdxl) Model link: [View model](https://modelslab.com/models/omnium-sdxl) View all models: [View Models](https://modelslab.com/models) import requests import json url = "https://modelslab.com/api/v6/images/text2img" payload = json.dumps({ "key": "your_api_key", "model_id": "omnium-sdxl", "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**
LoneStriker/openchat-3.5-0106-laser-5.0bpw-h6-exl2
LoneStriker
2024-01-27T13:37:21Z
6
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "conversational", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T13:35:17Z
--- license: apache-2.0 --- by David, Fernando and Eric Sponsored by: [VAGO Solutions](https://vago-solutions.de) and [HyperSpace.Ai](https://hyperspace.computer/) Join our Discord! https://discord.gg/vT3sktQ3zb A laser version of [openchat/openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106) It follows the implementation of laserRMT @ https://github.com/cognitivecomputations/laserRMT Here, we are controlling layers checking which ones have lower signal to noise ratios (which are more subject to noise), to apply Laser interventions, still using Machenko Pastur to calculate this ratio. We intend to be the first of a family of experimentations being carried out @ Cognitive Computations.
smangrul/mistral-sft
smangrul
2024-01-27T13:34:07Z
35
0
peft
[ "peft", "tensorboard", "safetensors", "trl", "sft", "generated_from_trainer", "dataset:generator", "base_model:mistralai/Mistral-7B-v0.1", "base_model:adapter:mistralai/Mistral-7B-v0.1", "license:apache-2.0", "region:us" ]
null
2024-01-27T12:43:42Z
--- license: apache-2.0 library_name: peft tags: - trl - sft - generated_from_trainer datasets: - generator base_model: mistralai/Mistral-7B-v0.1 model-index: - name: mistral-sft 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. --> # mistral-sft This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on the generator dataset. It achieves the following results on the evaluation set: - Loss: 1.0067 ## 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.0002 - train_batch_size: 8 - eval_batch_size: 8 - seed: 100 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - lr_scheduler_warmup_ratio: 0.1 - num_epochs: 1.0 ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:----:|:---------------:| | 1.006 | 1.0 | 817 | 1.0067 | ### Framework versions - PEFT 0.7.2.dev0 - Transformers 4.38.0.dev0 - Pytorch 2.1.2+cu121 - Datasets 2.15.0 - Tokenizers 0.15.1
JoshVictor/llama-2-7b-chat-hf-MEDCODEX1
JoshVictor
2024-01-27T13:20:07Z
9
0
transformers
[ "transformers", "safetensors", "llama", "text-generation", "conversational", "arxiv:1910.09700", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T13:13:24Z
--- library_name: transformers tags: [] --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
KayEe/unsloth-llama7b-karthi
KayEe
2024-01-27T13:18:27Z
0
0
transformers
[ "transformers", "safetensors", "unsloth", "arxiv:1910.09700", "endpoints_compatible", "region:us" ]
null
2024-01-27T13:18:13Z
--- library_name: transformers tags: - unsloth --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
muzammil-eds/tinyllama-3T-64k-JsonExtract-v0.3
muzammil-eds
2024-01-27T13:14:14Z
0
0
transformers
[ "transformers", "safetensors", "unsloth", "arxiv:1910.09700", "endpoints_compatible", "region:us" ]
null
2024-01-27T13:14:05Z
--- library_name: transformers tags: - unsloth --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
LarryAIDraw/danartemis-nvwls-v1
LarryAIDraw
2024-01-27T13:12:09Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:58:02Z
--- license: creativeml-openrail-m --- https://civitai.com/models/276810/artemis-is-it-wrong-to-try-to-pick-up-girls-in-a-dungeon-lora
LarryAIDraw/MeiS2-10
LarryAIDraw
2024-01-27T13:11:52Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:57:40Z
--- license: creativeml-openrail-m --- https://civitai.com/models/278092/mei-hatsume-black-tank-top-or-bnha
LarryAIDraw/asakura_tooru_theidolmstershinycolors
LarryAIDraw
2024-01-27T13:11:41Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:57:16Z
--- license: creativeml-openrail-m --- https://civitai.com/models/269336/asakuratooru-the-idolmster-shiny-colors
tejas00007/my-pet-dog
tejas00007
2024-01-27T13:10:53Z
29
1
diffusers
[ "diffusers", "NxtWave-GenAI-Webinar", "text-to-image", "stable-diffusion", "license:creativeml-openrail-m", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
2024-01-27T13:07:07Z
--- license: creativeml-openrail-m tags: - NxtWave-GenAI-Webinar - text-to-image - stable-diffusion --- ### My-Pet-Dog Dreambooth model trained by tejas00007 following the "Build your own Gen AI model" session by NxtWave. Project Submission Code: GoX19932gAS Sample pictures of this concept: ![0](https://huggingface.co/tejas00007/my-pet-dog/resolve/main/sample_images/xzg(3).jpg) ![1](https://huggingface.co/tejas00007/my-pet-dog/resolve/main/sample_images/xzg(1).jpg) ![2](https://huggingface.co/tejas00007/my-pet-dog/resolve/main/sample_images/xzg(4).jpg) ![3](https://huggingface.co/tejas00007/my-pet-dog/resolve/main/sample_images/xzg(2).jpg)
NbAiLabBeta/nb-whisper-large
NbAiLabBeta
2024-01-27T13:10:25Z
459
8
transformers
[ "transformers", "pytorch", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-large", "base_model:quantized:openai/whisper-large", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-09T18:18:51Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-large tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # NB-Whisper Large (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Large model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-large](https://huggingface.co/openai/whisper-large) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-large") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-large/resolve/main/ggml-model.bin -O models/nb-large-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-large/resolve/main/ggml-model-q5_0.bin -O models/nb-large-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-large-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-large-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-large --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Large model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
LarryAIDraw/e7_tamarine-sp1_v1_0
LarryAIDraw
2024-01-27T13:10:20Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:54:20Z
--- license: creativeml-openrail-m --- https://civitai.com/models/278245/epic-seventamarinne
LarryAIDraw/OGT_Tohka_Yatogami-v2
LarryAIDraw
2024-01-27T13:09:46Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:53:33Z
--- license: creativeml-openrail-m --- https://civitai.com/models/217375/tohka-yatogami-date-a-live
LarryAIDraw/summer_fiora
LarryAIDraw
2024-01-27T13:09:14Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:50:22Z
--- license: creativeml-openrail-m --- https://civitai.com/models/242506?modelVersionId=273641
LarryAIDraw/hina__blue_archive_
LarryAIDraw
2024-01-27T13:09:00Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:49:49Z
--- license: creativeml-openrail-m --- https://civitai.com/models/280329/sorasaki-hina-blue-archive
alnrg2arg/test3_sft_16bit
alnrg2arg
2024-01-27T13:08:40Z
9
1
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "text-generation-inference", "unsloth", "trl", "conversational", "en", "dataset:Open-Orca/SlimOrca", "base_model:alnrg2arg/blockchainlabs_7B_merged_test2_4", "base_model:finetune:alnrg2arg/blockchainlabs_7B_merged_test2_4", "license:cc-by-nc-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-generation
2024-01-26T17:29:41Z
--- language: - en license: cc-by-nc-4.0 tags: - text-generation-inference - transformers - unsloth - mistral - trl base_model: alnrg2arg/blockchainlabs_7B_merged_test2_4 datasets: - Open-Orca/SlimOrca --- # Uploaded model - **Finetuned from model :** alnrg2arg/blockchainlabs_7B_merged_test2_4 This is a SFT version of the model from blockchainlab test 2.4 - alnrg2arg/blockchainlabs_7B_merged_test2_4. The project is running to make a small LLM for a on-device purpose. Overall pipeline for this iteration is 1.Merging to make a base model (7B) 2.Prune the model to reduce the parameter (50% sparcity) 3.For recovery phase of the pruning, the DPO is chosen. This model which is not pruned is intended to compare with the pruned model. DPO consists of two parts : SFT and DPO - Now this model is the intermediate format (SFT) This model can also be compared to the DPO version of the model. This is the code and parameters I chose for this model(SFT). ``` from transformers import TrainingArguments from trl import SFTTrainer from datasets import load_dataset from unsloth import FastLanguageModel, FastMistralModel max_seq_length = 2048 # Supports automatic RoPE Scaling, so choose any number # Load model model, tokenizer = FastMistralModel.from_pretrained( model_name = "alnrg2arg/blockchainlabs_7B_merged_test2_4, max_seq_length = max_seq_length, dtype = None, # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+ load_in_4bit = True, # Use 4bit quantization to reduce memory usage. Can be False #device_map = "balanced" # token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf ) model = FastMistralModel.get_peft_model( model, r = 16, target_modules = ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj",], lora_alpha = 16, lora_dropout = 0, # Dropout = 0 is currently optimized bias = "none", # Bias = "none" is currently optimized use_gradient_checkpointing = True, random_state = 3407, max_seq_length = max_seq_length, ) ``` The code and parameters are borrowed from https://colab.research.google.com/drive/1SKrKGV-BZoU4kv5q3g0jtE_OhRgPtrrQ?usp=sharing Benchmark scores | Tasks |Version|Filter|n-shot| Metric |Value | |Stderr| |-------------|------:|------|-----:|--------|-----:|---|-----:| |arc_challenge| 1|none | 25|acc |0.7116|± |0.0132| | | |none | 25|acc_norm|0.7346|± |0.0129| | Tasks |Version|Filter|n-shot| Metric |Value | |Stderr| |---------|------:|------|-----:|--------|-----:|---|-----:| |hellaswag| 1|none | 10|acc |0.7222|± |0.0045| | | |none | 10|acc_norm|0.8865|± |0.0032| | Tasks |Version|Filter|n-shot|Metric|Value | |Stderr| |--------------|------:|------|-----:|------|-----:|---|-----:| |truthfulqa_mc2| 2|none | 0|acc |0.7043|± | 0.015| | Groups |Version|Filter|n-shot|Metric|Value | |Stderr| |------------------|-------|------|-----:|------|-----:|---|-----:| |mmlu |N/A |none | 0|acc |0.6367|± |0.1258| | - humanities |N/A |none | 5|acc |0.5968|± |0.1122| | - other |N/A |none | 5|acc |0.7049|± |0.1123| | - social_sciences|N/A |none | 5|acc |0.7374|± |0.0774| | - stem |N/A |none | 5|acc |0.5309|± |0.1373| | Tasks |Version|Filter|n-shot|Metric|Value | |Stderr| |----------|------:|------|-----:|------|-----:|---|-----:| |winogrande| 1|none | 5|acc |0.8477|± |0.0101| |Tasks|Version| Filter |n-shot| Metric |Value | |Stderr| |-----|------:|----------|-----:|-----------|-----:|---|-----:| |gsm8k| 2|get-answer| 5|exact_match|0.7468|± | 0.012| Average 75.94
LarryAIDraw/delta-nvwls-v1
LarryAIDraw
2024-01-27T13:08:14Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:48:22Z
--- license: creativeml-openrail-m --- https://civitai.com/models/278738/delta-the-eminence-in-shadow-lora
LarryAIDraw/EPfeMicaiah-07
LarryAIDraw
2024-01-27T13:08:04Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:47:56Z
--- license: creativeml-openrail-m --- https://civitai.com/models/279340/micaiah-fire-emblem-series-lora
LarryAIDraw/Fuyutsuki-4
LarryAIDraw
2024-01-27T13:07:24Z
0
0
null
[ "license:creativeml-openrail-m", "region:us" ]
null
2024-01-27T12:47:29Z
--- license: creativeml-openrail-m --- https://civitai.com/models/26231/kancolle-fuyutsuki-kantai-collection
MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF
MaziyarPanahi
2024-01-27T13:04:35Z
59
0
transformers
[ "transformers", "gguf", "mistral", "quantized", "2-bit", "3-bit", "4-bit", "5-bit", "6-bit", "8-bit", "GGUF", "safetensors", "text-generation", "Safetensors", "text-generation-inference", "merge", "7b", "mistralai/Mistral-7B-Instruct-v0.1", "cognitivecomputations/dolphin-2.6-mistral-7b", "pytorch", "en", "dataset:ehartford/dolphin", "dataset:jondurbin/airoboros-2.2.1", "dataset:ehartford/dolphin-coder", "dataset:teknium/openhermes", "dataset:ise-uiuc/Magicoder-OSS-Instruct-75K", "dataset:ise-uiuc/Magicoder-Evol-Instruct-110K", "dataset:LDJnr/Capybara", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us", "base_model:MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1", "base_model:quantized:MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1", "conversational" ]
text-generation
2024-01-27T12:56:05Z
--- license: apache-2.0 tags: - quantized - 2-bit - 3-bit - 4-bit - 5-bit - 6-bit - 8-bit - GGUF - transformers - safetensors - mistral - text-generation - Safetensors - text-generation-inference - merge - 7b - mistralai/Mistral-7B-Instruct-v0.1 - cognitivecomputations/dolphin-2.6-mistral-7b - pytorch - en - dataset:ehartford/dolphin - dataset:jondurbin/airoboros-2.2.1 - dataset:ehartford/dolphin-coder - dataset:teknium/openhermes - dataset:ise-uiuc/Magicoder-OSS-Instruct-75K - dataset:ise-uiuc/Magicoder-Evol-Instruct-110K - dataset:LDJnr/Capybara - license:apache-2.0 - autotrain_compatible - endpoints_compatible - region:us model_name: dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF base_model: MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1 inference: false model_creator: MaziyarPanahi pipeline_tag: text-generation quantized_by: MaziyarPanahi --- # [MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF) - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi) - Original model: [MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1) ## Description [MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF) contains GGUF format model files for [MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1). ## How to use Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models: ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models. ### Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: [MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF) and below it, a specific filename to download, such as: dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` </details> <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download [MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 32768` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./dolphin-2.6-mistral-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
tangjs/tex-lora
tangjs
2024-01-27T13:01:40Z
2
0
diffusers
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "lora", "base_model:runwayml/stable-diffusion-v1-5", "base_model:adapter:runwayml/stable-diffusion-v1-5", "license:creativeml-openrail-m", "region:us" ]
text-to-image
2024-01-25T14:05:55Z
--- license: creativeml-openrail-m base_model: runwayml/stable-diffusion-v1-5 tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - lora inference: true --- # LoRA text2image fine-tuning - tangjs/tex-lora These are LoRA adaption weights for runwayml/stable-diffusion-v1-5. The weights were fine-tuned on the None dataset. 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)
TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ
TheBloke
2024-01-27T12:58:31Z
46
4
transformers
[ "transformers", "safetensors", "llama", "text-generation", "base_model:grimulkan/Goliath-longLORA-120b-rope8-32k-fp16", "base_model:quantized:grimulkan/Goliath-longLORA-120b-rope8-32k-fp16", "license:llama2", "autotrain_compatible", "text-generation-inference", "4-bit", "awq", "region:us" ]
text-generation
2024-01-27T08:34:45Z
--- base_model: grimulkan/Goliath-longLORA-120b-rope8-32k-fp16 inference: false license: llama2 model_creator: Grimulkan model_name: Goliath LongLORA 120B Rope8 32K model_type: llama prompt_template: 'Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ' quantized_by: TheBloke --- <!-- markdownlint-disable MD041 --> <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Goliath LongLORA 120B Rope8 32K - AWQ - Model creator: [Grimulkan](https://huggingface.co/grimulkan) - Original model: [Goliath LongLORA 120B Rope8 32K](https://huggingface.co/grimulkan/Goliath-longLORA-120b-rope8-32k-fp16) <!-- description start --> ## Description This repo contains AWQ model files for [Grimulkan's Goliath LongLORA 120B Rope8 32K](https://huggingface.co/grimulkan/Goliath-longLORA-120b-rope8-32k-fp16). These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/). ### 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 with equivalent or better quality compared to the most commonly used GPTQ settings. AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead. It is supported by: - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types. - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-GGUF) * [Grimulkan's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/grimulkan/Goliath-longLORA-120b-rope8-32k-fp16) <!-- 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 --> <!-- README_AWQ.md-provided-files start --> ## Provided files, and AWQ parameters I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered. Models are released as sharded safetensors files. | Branch | Bits | GS | AWQ Dataset | Seq Len | Size | | ------ | ---- | -- | ----------- | ------- | ---- | | [main](https://huggingface.co/TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 61.95 GB <!-- README_AWQ.md-provided-files end --> <!-- README_AWQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui) Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ`. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `Goliath-longLORA-120b-rope8-32k-fp16-AWQ` 7. Select **Loader: AutoAWQ**. 8. Click Load, and the model will load and is now ready for use. 9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started! <!-- README_AWQ.md-text-generation-webui end --> <!-- README_AWQ.md-use-from-vllm start --> ## Multi-user inference server: vLLM Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/). - Please ensure you are using vLLM version 0.2 or later. - When using vLLM as a server, pass the `--quantization awq` parameter. For example: ```shell python3 -m vllm.entrypoints.api_server --model TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ --quantization awq --dtype auto ``` - When using vLLM from Python code, again set `quantization=awq`. For example: ```python from vllm import LLM, SamplingParams prompts = [ "Tell me about AI", "Write a story about llamas", "What is 291 - 150?", "How much wood would a woodchuck chuck if a woodchuck could chuck wood?", ] prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ''' prompts = [prompt_template.format(prompt=prompt) for prompt in prompts] sampling_params = SamplingParams(temperature=0.8, top_p=0.95) llm = LLM(model="TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ", quantization="awq", dtype="auto") 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-tgi start --> ## Multi-user inference server: Hugging Face Text Generation Inference (TGI) Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0` Example Docker parameters: ```shell --model-id TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096 ``` Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later): ```shell pip3 install huggingface-hub ``` ```python from huggingface_hub import InferenceClient endpoint_url = "https://your-endpoint-url-here" prompt = "Tell me about AI" prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ''' client = InferenceClient(endpoint_url) response = client.text_generation(prompt, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1) print(f"Model output: ", response) ``` <!-- README_AWQ.md-use-from-tgi end --> <!-- README_AWQ.md-use-from-python start --> ## Inference from Python code using Transformers ### Install the necessary packages - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later. - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later. ```shell pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0" ``` Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0. If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command: ```shell pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl ``` 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 . ``` ### Transformers example code (requires Transformers 4.35.0 and later) ```python from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model_name_or_path = "TheBloke/Goliath-longLORA-120b-rope8-32k-fp16-AWQ" tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) model = AutoModelForCausalLM.from_pretrained( model_name_or_path, low_cpu_mem_usage=True, device_map="cuda:0" ) # Using the text streamer to stream output one token at a time streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) prompt = "Tell me about AI" prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: {prompt} ### Response: ''' # Convert prompt to tokens tokens = tokenizer( prompt_template, return_tensors='pt' ).input_ids.cuda() generation_params = { "do_sample": True, "temperature": 0.7, "top_p": 0.95, "top_k": 40, "max_new_tokens": 512, "repetition_penalty": 1.1 } # Generate streamed output, visible one token at a time generation_output = model.generate( tokens, streamer=streamer, **generation_params ) # Generation without a streamer, which will include the prompt in the output generation_output = model.generate( tokens, **generation_params ) # Get the tokens from the output, decode them, print them token_output = generation_output[0] text_output = tokenizer.decode(token_output) print("model.generate output: ", text_output) # Inference is also possible via Transformers' pipeline from transformers import pipeline pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, **generation_params ) pipe_output = pipe(prompt_template)[0]['generated_text'] print("pipeline output: ", pipe_output) ``` <!-- README_AWQ.md-use-from-python end --> <!-- README_AWQ.md-compatibility start --> ## Compatibility The files provided are tested to work with: - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`. - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later. - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later. - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later. - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later. <!-- 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**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Grimulkan's Goliath LongLORA 120B Rope8 32K This is an interleaved merge of [Xwin-longLORA-70b-rope8-32k-fp16](https://huggingface.co/grimulkan/Xwin-longLORA-70b-rope8-32k-fp16) and [Euryale-1.3-longLORA-70b-rope8-32k-fp16](https://huggingface.co/grimulkan/Euryale-1.3-longLORA-70b-rope8-32k-fp16), using the same merge formula as alpindale's [goliath-120b](https://huggingface.co/alpindale/goliath-120b). There is no additional fine-tuning. The resulting model seems to not be broken... you can test whether it is truly the original model + 32K capability (use linear rope scaling 8). [ChuckMcSneed](https://huggingface.co/ChuckMcSneed) did a benchmark [here](https://huggingface.co/grimulkan/Goliath-longLORA-120b-rope8-32k-fp16/discussions/1), indicating 30% degradation with 8x the context length. A 6-bit EXL2 quantization is available [here](https://huggingface.co/grimulkan/Goliath-longLORA-120b-rope8-2k-6bpw_h8_exl2). More EXL2 quants [here](https://huggingface.co/aikitoria/Goliath-longLORA-120b-rope8-32k-exl2), thanks to aikitoria. See [this discussion](https://huggingface.co/grimulkan/aurelian-v0.5-70b-rope8-32K-fp16/discussions/2) for how the original 70B merges were created with longLORA.
omo-vxlot/ddpm-ema-pokemonv2-128
omo-vxlot
2024-01-27T12:54:00Z
6
0
diffusers
[ "diffusers", "tensorboard", "safetensors", "code", "en", "dataset:madebyollin/pokemon-512", "arxiv:1910.09700", "license:mit", "diffusers:DDPMPipeline", "region:us" ]
null
2024-01-27T04:59:48Z
--- license: mit datasets: - madebyollin/pokemon-512 language: - en library_name: diffusers tags: - code --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1). ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
Albe/textual_inversion_halpern
Albe
2024-01-27T12:43:15Z
5
0
diffusers
[ "diffusers", "tensorboard", "safetensors", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "textual_inversion", "base_model:runwayml/stable-diffusion-v1-5", "base_model:adapter:runwayml/stable-diffusion-v1-5", "license:creativeml-openrail-m", "autotrain_compatible", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
2024-01-27T11:32:14Z
--- license: creativeml-openrail-m base_model: runwayml/stable-diffusion-v1-5 tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - textual_inversion inference: true --- # Textual inversion text2image fine-tuning - Albe/textual_inversion_halpern These are textual inversion adaption weights for runwayml/stable-diffusion-v1-5. You can find some example images in the following.
yukihirop/bert-finetuned-squad
yukihirop
2024-01-27T12:41:27Z
94
0
transformers
[ "transformers", "tensorboard", "safetensors", "bert", "question-answering", "generated_from_trainer", "base_model:google-bert/bert-base-cased", "base_model:finetune:google-bert/bert-base-cased", "license:apache-2.0", "endpoints_compatible", "region:us" ]
question-answering
2024-01-27T09:38:39Z
--- license: apache-2.0 base_model: bert-base-cased tags: - generated_from_trainer model-index: - name: bert-finetuned-squad 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. --> # bert-finetuned-squad This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on an unknown dataset. ## 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 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
NbAiLabBeta/nb-whisper-base-verbatim
NbAiLabBeta
2024-01-27T12:41:19Z
70
0
transformers
[ "transformers", "pytorch", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-base", "base_model:quantized:openai/whisper-base", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-08T21:59:25Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-base tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # Finetuned Verbatim model. This model is trained 200 additional steps on top of the model below. This makes it outputting only text in lowercase and without punctation. It is also considerably more verbatim, and will not make any attempt at correcting grammatical errors in the text # NB-Whisper Base Verbatim (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Base Verbatim model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-base](https://huggingface.co/openai/whisper-base) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-base-verbatim") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-base/resolve/main/ggml-model.bin -O models/nb-base-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-base/resolve/main/ggml-model-q5_0.bin -O models/nb-base-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-base-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-base-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-base-verbatim --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Base Verbatim model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
NbAiLabBeta/nb-whisper-base
NbAiLabBeta
2024-01-27T12:36:03Z
209
0
transformers
[ "transformers", "pytorch", "tf", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-base", "base_model:quantized:openai/whisper-base", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-07T21:31:45Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-base tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # NB-Whisper Base (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Base model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-base](https://huggingface.co/openai/whisper-base) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-base") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-base/resolve/main/ggml-model.bin -O models/nb-base-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-base/resolve/main/ggml-model-q5_0.bin -O models/nb-base-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-base-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-base-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-base --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Base model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
mjm4dl/slt_flng_v01_4bit_gptq
mjm4dl
2024-01-27T12:31:01Z
2
0
transformers
[ "transformers", "mistral", "text-generation", "conversational", "arxiv:1910.09700", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T12:28:41Z
--- library_name: transformers tags: [] --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
Artefact2/KuroMitsu-11B-GGUF
Artefact2
2024-01-27T12:30:01Z
24
0
null
[ "gguf", "en", "license:cc-by-nc-4.0", "endpoints_compatible", "region:us" ]
null
2024-01-27T08:16:45Z
--- license: cc-by-nc-4.0 language: - en --- These are GGUF quantized versions of [Himitsui/KuroMitsu-11B](https://huggingface.co/Himitsui/KuroMitsu-11B). The importance matrix was trained for 1M tokens (2,000 batches of 512 tokens) using `wiki.train.raw`. The IQ2_XXS and IQ2_XS versions are compatible with llama.cpp, version `147b17a` or later.
NbAiLabBeta/nb-whisper-tiny
NbAiLabBeta
2024-01-27T12:28:23Z
137
0
transformers
[ "transformers", "pytorch", "tf", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "asr", "hf-asr-leaderboard", "no", "nb", "nn", "en", "dataset:NbAiLab/ncc_speech", "dataset:NbAiLab/NST", "dataset:NbAiLab/NPSC", "arxiv:2212.04356", "base_model:openai/whisper-tiny", "base_model:quantized:openai/whisper-tiny", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-07T21:32:05Z
--- license: apache-2.0 language: - 'no' - nb - nn - en datasets: - NbAiLab/ncc_speech - NbAiLab/NST - NbAiLab/NPSC base_model: openai/whisper-tiny tags: - audio - asr - automatic-speech-recognition - hf-asr-leaderboard metrics: - wer - cer library_name: transformers pipeline_tag: automatic-speech-recognition widget: - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/1/audio/audio.mp3 example_title: FLEURS sample 1 - src: https://datasets-server.huggingface.co/assets/google/fleurs/--/nb_no/train/4/audio/audio.mp3 example_title: FLEURS sample 2 --- # NB-Whisper Tiny (Release Candidate) **IMPORTANT:** These models are currently Release Candidates. We are in the final stages of testing. If everything proceeds smoothly, we plan to officially release the models later this month. Introducing the **_Norwegian NB-Whisper Tiny model_**, proudly developed by the National Library of Norway. NB-Whisper is a cutting-edge series of models designed for automatic speech recognition (ASR) and speech translation. These models are based on the work of [OpenAI's Whisper](https://arxiv.org/abs/2212.04356). Each model in the series has been trained for 250,000 steps, utilizing a diverse dataset of 8 million samples. These samples consist of aligned audio clips, each 30 seconds long, culminating in a staggering 66,000 hours of speech. For an in-depth understanding of our training methodology and dataset composition, keep an eye out for our upcoming article. | Model Size | Parameters | Model | |------------|------------|------------| | Tiny | 39M | [NB-Whisper Tiny](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny) | | Base | 74M | [NB-Whisper Base](https://huggingface.co/NbAiLabBeta/nb-whisper-base) | | Small | 244M | [NB-Whisper Small](https://huggingface.co/NbAiLabBeta/nb-whisper-small) | | Medium | 769M | [NB-Whisper Medium](https://huggingface.co/NbAiLabBeta/nb-whisper-medium) | | Large | 1550M | [NB-Whisper Large](https://huggingface.co/NbAiLabBeta/nb-whisper-large) | ### Specialised Models While the main models are suitable for most transcription task, we demonstrate how easy it is to change the output of the main model. The following models are trained 250 additional steps from the main models above, and might be suitable for more targetted use cases: - **Verbatim version**: This lower-cased variant is more literal and suitable for tasks requiring detailed transcription, such as linguistic analysis. - **Semantic version**: This variant focuses less on verbatim accuracy but captures the essence of content, ideal for meeting minutes and subtitling. | Model Size | Parameters | Verbatim version | Semantic version | |------------|------------|------------|------------------| | Tiny | 39M | [Tiny - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-verbatim) | [Tiny - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-tiny-semantic) | | Base | 74M | [Base - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-base-verbatim) | [Base - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-base-semantic) | | Small | 244M | [Small - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-small-verbatim) | [Small - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-small-semantic) | | Medium | 769M | [Medium - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-verbatim) | [Medium - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-medium-semantic) | | Large | 1550M | [Large - verbatim](https://huggingface.co/NbAiLabBeta/nb-whisper-large-verbatim) | [Large - semantic](https://huggingface.co/NbAiLabBeta/nb-whisper-large-semantic) | ### Model Description - **Developed by:** [NB AI-Lab](https://ai.nb.no/) - **Shared by:** [NB AI-Lab](https://ai.nb.no/) - **Model type:** `whisper` - **Language(s) (NLP):** Norwegian, Norwegian Bokmål, Norwegian Nynorsk, English - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Trained from model:** [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) - **Code Repository:** https://github.com/NbAiLab/nb-whisper/ - **Paper:** _Coming soon_ - **Demo:** _See Spaces on this page_ ## How to Use the Models ### Online Demos You can try the models directly through the HuggingFace Inference API, accessible on the right side of this page. Be aware that initially, the model needs to load and will run on limited CPU capacity, which might be slow. To enhance your experience, we are temporarily hosting some models on TPUs for a few days, significantly boosting their performance. Explore these under the **Spaces** section on the [Main Page](https://huggingface.co/NbAiLabBeta/). ### Local Setup with HuggingFace Alternatively, you can run the models locally. The Tiny, Base, and Small models are optimized for CPU execution. For the Medium and Large models, we recommend a system equipped with a GPU to ensure efficient processing. Setting up and using these models with HuggingFace's Transformers is straightforward, provided you have [Python](https://www.python.org/downloads/) installed on your machine. For practical demonstrations, refer to examples using this [sample mp3 file](https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3). ```bash # Download the sample file $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 # Install necessary libraries. $ pip install transformers>=4.35.2 ``` After this is done, you should be able to run this in Python: ```python from transformers import pipeline # Load the model asr = pipeline("automatic-speech-recognition", "NbAiLabBeta/nb-whisper-tiny") #transcribe asr("king.mp3", generate_kwargs={'task': 'transcribe', 'language': 'no'}) ``` <details> <summary>Expected output</summary> ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra.'} } ``` </details> #### Extended HuggingFace Examining the output above, we see that there are multiple repetitions at the end. This is because the video is longer than 30 seconds. By passing the ```chunk_lengt_s``` argument, we can transcribe longer file. Our experience is that we get slightly better result by setting that to 28 seconds instead of the default 30 seconds. We also recommend setting the beam size to 5 if possible. This greatly increases the accuracy but takes a bit longer and requires slightly more memory. The examples below also illustrates how to transcribe to English or Nynorsk, and how to get timestamps for sentences and words. ```python # Long Transcripts asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Increase accuracy by setting beam size to 5 asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'num_beams': 5, 'task': 'transcribe', 'language': 'no'}) # Return Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps=True, generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Return Word Level Timestamps asr("king.mp3", chunk_length_s=28, return_timestamps="word", generate_kwargs={'task': 'transcribe', 'language': 'no'}) # Transcribe to Nynorsk asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'nn'}) # Transcribe to English asr("king.mp3", chunk_length_s=28, generate_kwargs={'task': 'transcribe', 'language': 'en'}) ``` <details> <summary>Expected output</summary> Long transcripts: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'} } ``` Timestamps: ```json { {'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra. Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.', 'chunks': [{'timestamp': (0.0, 5.46), 'text': ' Nordmenn er nordlendinger, trøndere, sørlendinger'}, {'timestamp': (5.52, 8.68), 'text': ' og folk fra alle andre regioner.'}, {'timestamp': (8.68, 16.64), 'text': ' Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria.'}, {'timestamp': (16.64, 13.3), 'text': ' Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi er fra.'}, {'timestamp': (13.32, 30.28), 'text': ' Hvilken nasjonalitet vi er fra. hvilken nasjonalitet vi tilhører.'}, {'timestamp': (32.52, 39.16), 'text': ' Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres'}, {'timestamp': (39.16, 42.0), 'text': ' innenfor landegrenser.'}, {'timestamp': (42.0, 46.74), 'text': ' Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter,'}, {'timestamp': (46.74, 51.12), 'text': ' og jenter og gutter som er glad i hverandre.'}, {'timestamp': (51.16, 57.42), 'text': ' Nordmenn trommer på Gud, Allah, Altet og ingenting.'}, {'timestamp': (57.42, 64.3), 'text': ' Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes.'}, {'timestamp': (64.34, 71.24), 'text': ' Med andre ord, Norge er dere. Norge er oss.'}, {'timestamp': (71.24, 78.04), 'text': ' Mitt største håp for Norge er at vi skal klare å ta vare på hverandre,'}, {'timestamp': (78.12, 84.68), 'text': ' at vi skal bygge dette landet videre på tillit, fellesskap og raushet.'}]} } ``` Word Level Timestamps: ```json { {"text": "Nordmenn er nordlendinger, trøndere, sørlendinger og folk fra alle andre regioner. Nordmenn er også innvandret fra Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikke alltid så lett å si hvor vi er fra, hvilken nasjonalitet vi tilhører. Det vi kaller hjem, er der hjertet vårt er, og det kan ikke alltid plasseres innenfor landegrenser. Nordmenn er jenter som er glad i jenter, gutter som er glad i gutter, og jenter og gutter som er glad i hverandre. Nordmenn trommer på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbilis og Kari Bremnes. Med andre ord, Norge er dere. Norge er oss. Mitt største håp for Norge er at vi skal klare å ta vare på hverandre, at vi skal bygge dette landet videre på tillit, fellesskap og raushet.", "chunks": [ {"text": "Nordmenn", "timestamp": [0.72, 1.42]}, {"text": "er", "timestamp": [1.42, 1.74]}, // ... more chunks ... {"text": "raushet.", "timestamp": [83.1, 84.88]} ] } } ``` Nynorsk: ```json { {"text": "Nordmenn er nordlendingar, trøndarar, sørlendingar og folk frå alle andre regionar. Nordmenn er også innvandra frå Afghanistan, Pakistan, Polen, Sverige, Somalia og Syria. Det er ikkje alltid så lett å seie kvar vi er frå, kva nasjonalitet vi tilhøyrer. Det vi kallar heim, er der hjartet vårt er, og det kan ikkje alltid plasserast innanfor landegrenser. Nordmenn er jenter som er glad i jenter, gutar som erade i gutar, og jenter og gutar som er glade i kvarandre. Nordmenn trommar på Gud, Allah, Altet og ingenting. Nordmenn liker Grieg, Kygo, Helbiles og Kari Bremnes. Med andre ord, Noreg er dere! Noreg er oss. Mitt største håp for Noreg er at vi skal klare å ta vare på kvarandre, at vi skal byggje dette landet vidare på tillit, fellesskap og raushet."} } ``` English: ```json { {"text": "Norwegians are Norwegians, trønders, southerners and people from all other regions. Norwegians are also invaded from Afghanistan, Pakistan, Poland, Sweden, Somalia and Suria. It is not always so easy to say where we are from, what nationality we belong to. What we call home is where our heart is, and it cannot always be placed within national borders. Norwegians are girls who like girls, boys who like boys, and girls and boys who like each other. Norwegians thrump on God, Allah, Altet and nothing. Norwegians like Grieg, Kygo, Helbilis and Kari Bremnes. In other words, Norway is you. Norway is us. My biggest hope for Norway is that we should be able to take care of each other, that we should build this country on trust, community and generosity."} } ``` </details> ### Whisper CPP Whisper CPP is a C++ implementation of the Whisper model, offering the same functionalities with the added benefits of C++ efficiency and performance optimizations. This allows embedding any Whisper model into a binary file, facilitating the development of real applications. However, it requires some familiarity with compiling C++ programs. Their [homepage](https://github.com/ggerganov/whisper.cpp) provides examples of how to build applications, including real-time transcription. We have converted this model to the ggml-format model used by Whisper CPP binaries. The file can be downloaded [here](blob/main/ggml-model.bin), and a `q5_0` quantized version is also available [here](blob/main/ggml-model-q5_0.bin). ```bash # We can download and compile whisper.cpp $ git clone --depth 1 https://github.com/ggerganov/whisper.cpp --branch v1.5.1 $ cd whisper.cpp/ $ make # We also need to convert the audio to WAV as that is the only format supported by whisper.cpp $ wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/king.mp3 $ ffmpeg -i king.mp3 -ar 16000 -ac 1 -c:a pcm_s16le king.wav # Lets download the two ggml-files from this site wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-tiny/resolve/main/ggml-model.bin -O models/nb-tiny-ggml-model.bin wget -N https://huggingface.co/NbAiLabBeta/nb-whisper-tiny/resolve/main/ggml-model-q5_0.bin -O models/nb-tiny-ggml-model-q5_0.bin # And run it with the f16 default model $ ./main -l no -m models/nb-tiny-ggml-model.bin king.wav # Or the quantized version $ ./main -l no -m models/nb-tiny-ggml-model-q5_0.bin king.wav ``` ### WhisperX and Speaker Diarization Speaker diarization is a technique in natural language processing and automatic speech recognition that identifies and separates different speakers in an audio recording. It segments the audio into parts based on who is speaking, enhancing the quality of transcribing meetings or phone calls. We find that [WhisperX](https://github.com/m-bain/whisperX) is the easiest way to use our models for diarizing speech. In addition, WhisperX is using phoneme-based Wav2Vec-models for improving the alignment of the timestamps. As of December 2023 it also has native support for using the nb-wav2vec-models. It currently uses [PyAnnote-audio](https://github.com/pyannote/pyannote-audio) for doing the actual diarization. This package has a fairly strict licence where you have to agree to user terms. Follow the instructions below. ```bash # Follow the install instructions on https://github.com/m-bain/whisperX # Make sure you have a HuggingFace account and have agreed to the pyannote terms # Log in (or supply HF Token in command line) huggingface-cli login # Download a test file wget -N https://github.com/NbAiLab/nb-whisper/raw/main/audio/knuthamsun.mp3 # Optional. If you get complains about not support for Norwegian, do: pip uninstall whisperx && pip install git+https://github.com/m-bain/whisperx.git@8540ff5985fceee764acbed94f656063d7f56540 # Transcribe the test file. All transcripts will end up in the directory of the mp3-file whisperx knuthamsun.mp3 --model NbAiLabBeta/nb-whisper-tiny --language no --diarize ``` You can also run WhisperX from Python. Please take a look at the instructions on [WhisperX homepage](https://github.com/m-bain/whisperX). ### API Instructions for accessing the models via a simple API are included in the demos under Spaces. Note that these demos are temporary and will only be available for a few weeks. ## Training Data The training data originates from Språkbanken and the National Library of Norway's digital collection, including: - NST Norwegian ASR Database (16 kHz) and its corresponding dataset - Transcribed speeches from the Norwegian Parliament by Språkbanken - TV broadcast (NRK) subtitles (NLN digital collection) - Audiobooks (NLN digital collection) ## Downstream Use The models, especially the smaller ones, may exhibit occasional hallucinations and may drop parts of the transcript. They are designed to convert spoken language into grammatically correct written sentences, which might not always be word-for-word translations. We have made two extra model variant for users that want a different transcription style. We encourage users to try the models themselves to get a better understanding. ## Bias, Risks, and Limitations Using these models without adequate risk assessment and mitigation could be considered irresponsible. They may contain biases or other undesirable distortions. Users who deploy these models or integrate them into systems or services are responsible for mitigating risks and complying with applicable AI regulations. The National Library of Norway, as the model owner, disclaims liability for any outcomes resulting from third-party use of these models. ### Software The model was trained using Jax/Flax and converted to PyTorch, Tensorflow, whisper.cpp, and ONXX formats. These are available under `Files and versions`. We welcome requests for conversion to other formats. All training code and scripts are released under the Apache License 2.0 in the GitHub repository [nb-whisper](https://github.com/NbAiLab/nb-whisper/). ## Citation & Contributors The NB-Whisper Tiny model is a product of the NoSTram project led by Per Egil Kummervold ([@pere](https://huggingface.co/pere)) at the National Library of Norway. Key contributors include Javier de la Rosa ([@versae](https://huggingface.co/versae)), Freddy Wetjen ([@freddyw](https://huggingface.co/freddyw)), and Rolv-Arild Braaten ([@Rolv-Arild](https://huggingface.co/Rolv-Arild)). NB AI-Lab, under the direction of Svein Arne Brygfjeld ([@Brygfjeld](https://huggingface.co/Brygfjeld)), supported the project's successful completion. A detailed paper on our process and findings is forthcoming. ## Disclaimer The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models. ## Acknowledgements Our gratitude extends to [Google TPU Research Cloud](https://sites.research.google/trc/about/) for training resources, Google Cloud for translation credits, and HuggingFace's Sanchit Ghandi for technical support. A special thank you to Per Erik Solberg at Språkbanken for the collaboration on the Stortinget corpus. ## Contact For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:[email protected]">[email protected]</a>. If you plan to include this model in your research, contact us for the latest information on our upcoming paper for citation purposes.
spidersouris/genre-t5-small-60k
spidersouris
2024-01-27T12:20:45Z
119
0
transformers
[ "transformers", "tensorboard", "safetensors", "t5", "text2text-generation", "generated_from_trainer", "base_model:google-t5/t5-small", "base_model:finetune:google-t5/t5-small", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text2text-generation
2024-01-27T08:24:35Z
--- license: apache-2.0 tags: - generated_from_trainer metrics: - bleu - wer base_model: t5-small model-index: - name: genre-t5-small-60k results: [] --- # results_t5small This model is a fine-tuned version of [t5-small](https://huggingface.co/t5-small) on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.0067 - Bleu: 95.7548 - Wer: 0.0246 - Gen Len: 62.3093 ## Model description TODO ## Intended uses & limitations TODO ## Training and evaluation data TODO ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0005 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - num_epochs: 5 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Bleu | Wer | Gen Len | |:-------------:|:-----:|:----:|:---------------:|:-------:|:------:|:-------:| | 0.0195 | 0.4 | 500 | 0.0153 | 93.2753 | 0.0427 | 62.7732 | | 0.0128 | 0.8 | 1000 | 0.0109 | 94.7989 | 0.0312 | 62.7715 | | 0.0121 | 1.2 | 1500 | 0.0094 | 95.0581 | 0.0295 | 62.266 | | 0.0105 | 1.6 | 2000 | 0.0087 | 95.2607 | 0.0286 | 62.1432 | | 0.009 | 2.0 | 2500 | 0.0083 | 95.3219 | 0.0274 | 62.2098 | | 0.0096 | 2.4 | 3000 | 0.0077 | 95.4354 | 0.0268 | 62.2532 | | 0.0071 | 2.8 | 3500 | 0.0075 | 95.5026 | 0.0261 | 62.3815 | | 0.0072 | 3.2 | 4000 | 0.0073 | 95.5419 | 0.0259 | 62.5688 | | 0.0074 | 3.6 | 4500 | 0.0071 | 95.6607 | 0.0254 | 62.7457 | | 0.0076 | 4.0 | 5000 | 0.0068 | 95.6779 | 0.0251 | 62.892 | | 0.0074 | 4.4 | 5500 | 0.0068 | 95.7313 | 0.0248 | 62.8282 | | 0.0077 | 4.8 | 6000 | 0.0067 | 95.7548 | 0.0246 | 62.3093 | ### Framework versions - Transformers 4.37.1 - Pytorch 2.1.2 - Datasets 2.16.1 - Tokenizers 0.15.1
MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF
MaziyarPanahi
2024-01-27T12:13:52Z
39
0
transformers
[ "transformers", "gguf", "mistral", "quantized", "2-bit", "3-bit", "4-bit", "5-bit", "6-bit", "8-bit", "GGUF", "safetensors", "text-generation", "Safetensors", "text-generation-inference", "merge", "7b", "mistralai/Mistral-7B-Instruct-v0.1", "SciPhi/SciPhi-Self-RAG-Mistral-7B-32k", "pytorch", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us", "license:apache-2.0", "base_model:MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1", "base_model:quantized:MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1", "conversational" ]
text-generation
2024-01-27T12:05:01Z
--- license: apache-2.0 tags: - quantized - 2-bit - 3-bit - 4-bit - 5-bit - 6-bit - 8-bit - GGUF - transformers - safetensors - mistral - text-generation - Safetensors - text-generation-inference - merge - 7b - mistralai/Mistral-7B-Instruct-v0.1 - SciPhi/SciPhi-Self-RAG-Mistral-7B-32k - pytorch - license:mit - autotrain_compatible - endpoints_compatible - region:us - license:apache-2.0 model_name: SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF base_model: MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1 inference: false model_creator: MaziyarPanahi pipeline_tag: text-generation quantized_by: MaziyarPanahi --- # [MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF) - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi) - Original model: [MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1) ## Description [MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF) contains GGUF format model files for [MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1). ## How to use Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models: ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models. ### Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: [MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF) and below it, a specific filename to download, such as: SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` </details> <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download [MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 32768` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./SciPhi-Self-RAG-Mistral-7B-32k-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
xezpeleta/latxa-7b-instruct-lora
xezpeleta
2024-01-27T12:13:31Z
5
0
peft
[ "peft", "safetensors", "text-generation", "dataset:xezpeleta/oasst2_eu", "arxiv:1910.09700", "base_model:HiTZ/latxa-7b-v1", "base_model:adapter:HiTZ/latxa-7b-v1", "region:us" ]
text-generation
2024-01-27T09:37:26Z
--- library_name: peft base_model: HiTZ/latxa-7b-v1 datasets: - xezpeleta/oasst2_eu pipeline_tag: text-generation --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed] ## Training procedure The following `bitsandbytes` quantization config was used during training: - quant_method: bitsandbytes - 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: float16 ### Framework versions - PEFT 0.6.2
MalikIbrar/gpt2-wikitext2
MalikIbrar
2024-01-27T12:02:27Z
9
0
transformers
[ "transformers", "tensorboard", "safetensors", "gpt2", "text-generation", "generated_from_trainer", "base_model:openai-community/gpt2", "base_model:finetune:openai-community/gpt2", "license:mit", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T10:45:42Z
--- license: mit base_model: gpt2 tags: - generated_from_trainer model-index: - name: gpt2-wikitext2 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. --> # gpt2-wikitext2 This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the None dataset. It achieves the following results on the evaluation set: - Loss: 5.8134 ## 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: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:-----:|:---------------:| | 6.5285 | 1.0 | 2249 | 6.4484 | | 6.1303 | 2.0 | 4498 | 6.1209 | | 5.8626 | 3.0 | 6747 | 5.9464 | | 5.7155 | 4.0 | 8996 | 5.8487 | | 5.616 | 5.0 | 11245 | 5.8134 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
Sharka/CIVQA_DVQA_LayoutLMv2
Sharka
2024-01-27T11:56:28Z
44
0
transformers
[ "transformers", "pytorch", "layoutlmv2", "document-question-answering", "document question answering", "cs", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2024-01-27T11:34:53Z
--- license: mit language: - cs tags: - document question answering --- # LayoutLMv2 Model Fine-tuned with CIVQA (Tesseract) dataset This is a fine-tuned version of the [LayoutLMv2 model](https://huggingface.co/microsoft/layoutlmv2-base-uncased), which was trained on Czech Invoice Visual Question Answering (CIVQA) dataset containing invoices in the Czech language as well as on the Data Visualizations via Question Answering ([DVQA] (https://paperswithcode.com/dataset/dvqa)) dataset. This model enables Document Visual Question Answering on Czech invoices with the use of the existing DVQA dataset. Regarding the Czech invoices, we focused on 10 different entities, which are crucial for processing the invoices. - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - Total amount - Invoice date - Name of supplier - DIC - QR code You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_DVQA_LayoutLMv3
Sharka
2024-01-27T11:56:13Z
30
1
transformers
[ "transformers", "pytorch", "layoutlmv3", "document-question-answering", "document question answering", "cs", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2024-01-16T10:37:47Z
--- license: mit language: - cs tags: - document question answering --- # LayoutLMv3 Model Fine-tuned with CIVQA (Tesseract) dataset This is a fine-tuned version of the [LayoutLMv3 model](https://huggingface.co/microsoft/layoutlmv3-base), which was trained on Czech Invoice Visual Question Answering (CIVQA) dataset containing invoices in the Czech language as well as on the Data Visualizations via Question Answering ([DVQA] (https://paperswithcode.com/dataset/dvqa)) dataset. This model enables Document Visual Question Answering on Czech invoices with the use of the existing DVQA dataset. Regarding the Czech invoices, we focused on 10 different entities, which are crucial for processing the invoices. - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - Total amount - Invoice date - Name of supplier - DIC - QR code You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_DVQA_LayoutXLM
Sharka
2024-01-27T11:55:57Z
48
0
transformers
[ "transformers", "pytorch", "layoutlmv2", "document-question-answering", "document question answering", "cs", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2024-01-15T10:21:01Z
--- license: mit language: - cs tags: - document question answering --- # LayoutXLM Model Fine-tuned with CIVQA and DVQA dataset This is a fine-tuned version of the [LayoutXLM model](https://huggingface.co/microsoft/layoutxlm-base), which was trained on Czech Invoice Visual Question Answering (CIVQA) dataset containing invoices in the Czech language as well as on the Data Visualizations via Question Answering ([DVQA] (https://paperswithcode.com/dataset/dvqa)) dataset. This model enables Document Visual Question Answering on Czech invoices with the use of the existing DVQA dataset. Regarding the Czech invoices, we focused on 10 different entities, which are crucial for processing the invoices. - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - Total amount - Invoice date - Name of supplier - DIC - QR code You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_LayoutXLM_EasyOCR
Sharka
2024-01-27T11:55:36Z
47
1
transformers
[ "transformers", "pytorch", "layoutlmv2", "document-question-answering", "Document Question Answering", "cs", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-18T00:07:12Z
--- license: mit language: - cs tags: - Document Question Answering --- # LayoutXLM Model Fine-tuned with CIVQA (EasyOCR) dataset This is a fine-tuned version of the [LayoutXLM model](https://huggingface.co/microsoft/layoutxlm-base), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_LayoutXLM
Sharka
2024-01-27T11:55:22Z
56
2
transformers
[ "transformers", "pytorch", "layoutlmv2", "document-question-answering", "document question answering", "cs", "dataset:fimu-docproc-research/CIVQA-TesseractOCR", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-14T19:04:34Z
--- license: mit datasets: - fimu-docproc-research/CIVQA-TesseractOCR language: - cs tags: - document question answering --- # LayoutXLM Model Fine-tuned with CIVQA (Tesseract) dataset This is a fine-tuned version of the [LayoutXLM model](https://huggingface.co/microsoft/layoutxlm-base), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_LayoutLMv2
Sharka
2024-01-27T11:55:03Z
48
0
transformers
[ "transformers", "pytorch", "layoutlmv2", "document-question-answering", "document question answering", "cs", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-17T09:22:13Z
--- license: mit language: - cs tags: - document question answering --- # LayoutLMv2 Model Fine-tuned with CIVQA (Tesseract) dataset This is a fine-tuned version of the [LayoutLMv2 model](https://huggingface.co/microsoft/layoutlmv2-base-uncased), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_LayoutLMv3
Sharka
2024-01-27T11:53:47Z
34
0
transformers
[ "transformers", "pytorch", "layoutlmv3", "document-question-answering", "Document Question Answering", "cs", "dataset:fimu-docproc-research/CIVQA-TesseractOCR", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-18T00:03:05Z
--- license: mit datasets: - fimu-docproc-research/CIVQA-TesseractOCR language: - cs tags: - Document Question Answering --- # LayoutLMv3 Model Fine-tuned with CIVQA (Tesseract) dataset This is a fine-tuned version of the [LayoutLMv3 model](https://huggingface.co/microsoft/layoutlmv3-base), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_Impira_I_EasyOCR
Sharka
2024-01-27T11:53:22Z
32
0
transformers
[ "transformers", "pytorch", "layoutlm", "document-question-answering", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-18T00:59:43Z
--- license: mit --- # Impira Invoices Model Fine-tuned with CIVQA (EasyOCR) dataset This is a fine-tuned version of the [Impira model](https://huggingface.co/impira/layoutlm-invoices), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_Impira_QA
Sharka
2024-01-27T11:53:04Z
31
0
transformers
[ "transformers", "pytorch", "layoutlm", "document-question-answering", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-18T01:00:14Z
--- license: mit --- # Impira Document QA Model Fine-tuned with CIVQA (Tesseract) dataset This is a fine-tuned version of the [Impira model](https://huggingface.co/impira/layoutlm-document-qa), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_Impira_QA_EasyOCR
Sharka
2024-01-27T11:52:25Z
30
0
transformers
[ "transformers", "pytorch", "layoutlm", "document-question-answering", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-18T00:58:42Z
--- license: mit --- # Impira Document QA Model Fine-tuned with CIVQA (EasyOCR) dataset This is a fine-tuned version of the [Impira model](https://huggingface.co/impira/layoutlm-document-qa), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
Sharka/CIVQA_LayoutLMv3_EasyOCR
Sharka
2024-01-27T11:51:54Z
31
0
transformers
[ "transformers", "pytorch", "layoutlmv3", "document-question-answering", "Document Question Answering", "cs", "license:mit", "endpoints_compatible", "region:us" ]
document-question-answering
2023-12-18T00:12:43Z
--- license: mit language: - cs tags: - Document Question Answering --- # LayoutLMv3 Model Fine-tuned with CIVQA (EasyOCR) dataset This is a fine-tuned version of the [LayoutLMv3 model](https://huggingface.co/microsoft/layoutlmv3-base), which was trained on Czech Invoice Visual Question Answering (CIVQA) datasets containing invoices in the Czech language. This model enables Document Visual Question Answering on Czech invoices. All invoices used in this dataset were obtained from public sources. Over these invoices, we were focusing on 15 different entities, which are crucial for processing the invoices. - Invoice number - Variable symbol - Specific symbol - Constant symbol - Bank code - Account number - ICO - Total amount - Invoice date - Due date - Name of supplier - IBAN - DIC - QR code - Supplier's address You can find more information about this model in this [paper](https://nlp.fi.muni.cz/raslan/raslan23.pdf#page=31).
CultriX/SevereNeuralBeagleTrix-7B
CultriX
2024-01-27T11:39:59Z
50
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "merge", "mergekit", "lazymergekit", "PetroGPT/WestSeverus-7B-DPO", "CultriX/MergeTrix-7B-v2", "mlabonne/NeuralBeagle14-7B", "base_model:PetroGPT/WestSeverus-7B-DPO", "base_model:merge:PetroGPT/WestSeverus-7B-DPO", "base_model:mlabonne/NeuralBeagle14-7B", "base_model:merge:mlabonne/NeuralBeagle14-7B", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-25T07:22:27Z
--- tags: - merge - mergekit - lazymergekit - PetroGPT/WestSeverus-7B-DPO - CultriX/MergeTrix-7B-v2 - mlabonne/NeuralBeagle14-7B base_model: - PetroGPT/WestSeverus-7B-DPO - CultriX/MergeTrix-7B-v2 - mlabonne/NeuralBeagle14-7B license: apache-2.0 --- # EDIT: Always check my space for the latest benchmark results for my models! * https://huggingface.co/spaces/CultriX/Yet_Another_LLM_Leaderboard # SevereNeuralBeagleTrix-7B SevereNeuralBeagleTrix-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing): * [PetroGPT/WestSeverus-7B-DPO](https://huggingface.co/PetroGPT/WestSeverus-7B-DPO) * [CultriX/MergeTrix-7B-v2](https://huggingface.co/CultriX/MergeTrix-7B-v2) * [mlabonne/NeuralBeagle14-7B](https://huggingface.co/mlabonne/NeuralBeagle14-7B) ## 🧩 Configuration ```yaml models: - model: mistralai/Mistral-7B-v0.1 # No parameters necessary for base model - model: PetroGPT/WestSeverus-7B-DPO parameters: density: 0.53 weight: 0.3 - model: CultriX/MergeTrix-7B-v2 parameters: density: 0.53 weight: 0.4 - model: mlabonne/NeuralBeagle14-7B parameters: density: 0.53 weight: 0.3 merge_method: dare_ties base_model: mistralai/Mistral-7B-v0.1 parameters: int8_mask: true dtype: float16 ``` ## 💻 Usage ```python !pip install -qU transformers accelerate from transformers import AutoTokenizer import transformers import torch model = "CultriX/SevereNeuralBeagleTrix-7B" messages = [{"role": "user", "content": "What is a large language model?"}] tokenizer = AutoTokenizer.from_pretrained(model) prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"]) ```
achimvp/ppo-PyramidsRND
achimvp
2024-01-27T11:39:54Z
0
0
ml-agents
[ "ml-agents", "tensorboard", "onnx", "Pyramids", "deep-reinforcement-learning", "reinforcement-learning", "ML-Agents-Pyramids", "region:us" ]
reinforcement-learning
2024-01-27T11:39:51Z
--- library_name: ml-agents tags: - Pyramids - deep-reinforcement-learning - reinforcement-learning - ML-Agents-Pyramids --- # **ppo** Agent playing **Pyramids** This is a trained model of a **ppo** agent playing **Pyramids** using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents). ## Usage (with ML-Agents) The Documentation: https://unity-technologies.github.io/ml-agents/ML-Agents-Toolkit-Documentation/ We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub: - A *short tutorial* where you teach Huggy the Dog 🐶 to fetch the stick and then play with him directly in your browser: https://huggingface.co/learn/deep-rl-course/unitbonus1/introduction - A *longer tutorial* to understand how works ML-Agents: https://huggingface.co/learn/deep-rl-course/unit5/introduction ### Resume the training ```bash mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume ``` ### Watch your Agent play You can watch your agent **playing directly in your browser** 1. If the environment is part of ML-Agents official environments, go to https://huggingface.co/unity 2. Step 1: Find your model_id: achimvp/ppo-PyramidsRND 3. Step 2: Select your *.nn /*.onnx file 4. Click on Watch the agent play 👀
CultriX/OmniTrixAI
CultriX
2024-01-27T11:39:47Z
51
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "merge", "mergekit", "lazymergekit", "mlabonne/NeuralBeagle14-7B", "FelixChao/WestSeverus-7B-DPO-v2", "CultriX/MergeTrix-7B-v2", "base_model:PetroGPT/WestSeverus-7B-DPO-v2", "base_model:merge:PetroGPT/WestSeverus-7B-DPO-v2", "base_model:mlabonne/NeuralBeagle14-7B", "base_model:merge:mlabonne/NeuralBeagle14-7B", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-25T13:56:18Z
--- tags: - merge - mergekit - lazymergekit - mlabonne/NeuralBeagle14-7B - FelixChao/WestSeverus-7B-DPO-v2 - CultriX/MergeTrix-7B-v2 base_model: - mlabonne/NeuralBeagle14-7B - FelixChao/WestSeverus-7B-DPO-v2 - CultriX/MergeTrix-7B-v2 license: apache-2.0 --- # EDIT: Always check my space for the latest benchmark results for my models! * https://huggingface.co/spaces/CultriX/Yet_Another_LLM_Leaderboard # OmniTrixAI OmniTrixAI is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing): * [mlabonne/NeuralBeagle14-7B](https://huggingface.co/mlabonne/NeuralBeagle14-7B) * [FelixChao/WestSeverus-7B-DPO-v2](https://huggingface.co/FelixChao/WestSeverus-7B-DPO-v2) * [CultriX/MergeTrix-7B-v2](https://huggingface.co/CultriX/MergeTrix-7B-v2) ## 🧩 Configuration ```yaml models: - model: senseable/WestLake-7B-v2 # No parameters necessary for base model - model: mlabonne/NeuralBeagle14-7B parameters: density: 0.65 weight: 0.40 - model: FelixChao/WestSeverus-7B-DPO-v2 parameters: density: 0.45 weight: 0.26 - model: CultriX/MergeTrix-7B-v2 parameters: density: 0.55 weight: 0.34 merge_method: dare_ties base_model: senseable/WestLake-7B-v2 parameters: int8_mask: true dtype: float16 ``` ## 💻 Usage ```python !pip install -qU transformers accelerate from transformers import AutoTokenizer import transformers import torch model = "CultriX/OmniTrixAI" messages = [{"role": "user", "content": "What is a large language model?"}] tokenizer = AutoTokenizer.from_pretrained(model) prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"]) ```
WeeRobots/phi-2-chat-v05
WeeRobots
2024-01-27T11:34:24Z
142
1
transformers
[ "transformers", "safetensors", "phi", "text-generation", "conversational", "custom_code", "en", "dataset:HuggingFaceH4/ultrachat_200k", "dataset:Open-Orca/OpenOrca", "license:mit", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T01:01:54Z
--- library_name: transformers license: mit datasets: - HuggingFaceH4/ultrachat_200k - Open-Orca/OpenOrca language: - en --- # Model Card for Model ID Phi-2-chat-v05 is a finetuned version of Phi-2 to increase the model's understanding of instructions and multi-turn conversations. In essence: it now has a concept of shutting up after an answer is given - as opposed to just switching into random generator mode. Finetuning used 25k records from the dataset `HuggingFaceH4/ultrachat_200k` # Prompt format ``` <|system|> You are a helpful assistant.... <|user|> Why is the sky blue? <|assistant|> The sky appears blue because of a phenomenon called Rayleigh scattering. When sunlight enters the Earth's atmosphere [...] <|user|> Who was the phenomenon named after? <|assistant|> ``` The system generates its output after the special token <|assistant|>. You need to have that token in the input for a reliable response. Or you can use the tokenizer's chat_template, as shown below. # How to use it? Dependencies ``` pip install -u torch[cuda] transformers einops ``` Code for inference. ```python import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_id = "WeeRobots/phi-2-chat-v05" model = AutoModelForCausalLM.from_pretrained(model_id, device_map={"": 0}, trust_remote_code=True) tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False, trust_remote_code=True) payload = tokenizer.apply_chat_template([ { 'role': 'system', 'content': '''You are a state machine. The user will add state slot values and you'll keep track of them.''' }, { 'role': 'user', 'content': '''Place 15 into slot apple''' }, { 'role': 'assistant', 'content': '''Roger that.''' }, { 'role': 'user', 'content': '''Bananas slot should be 20''' }, { 'role': 'assistant', 'content': '''Certainly''' }, { 'role': 'user', 'content': '''What is the value of Apple + Banana?''' }, ], tokenize=False, add_generation_prompt=True,) device = "cuda" model_input = tokenizer(payload, return_tensors="pt").to(device) with torch.no_grad(): # IMPORTANT: always set the eos_token_id in this call. the model is trained to emit the eos_token the right time # but it might continue generating irrelevant text. this way the model will stop at the right place model_response = model.generate(**model_input, max_new_tokens=512, eos_token_id=tokenizer.eos_token_id, ) print(tokenizer.decode(model_result[0], skip_special_tokens=False)) ``` # Non production quality Be aware that this model tuning wasn't thoroughly tested, and isn't meant to be used in production, only for experimentation or hobby projects.
MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF
MaziyarPanahi
2024-01-27T11:10:59Z
72
1
transformers
[ "transformers", "gguf", "mistral", "quantized", "2-bit", "3-bit", "4-bit", "5-bit", "6-bit", "8-bit", "GGUF", "safetensors", "text-generation", "Safetensors", "text-generation-inference", "merge", "7b", "mistralai/Mistral-7B-Instruct-v0.1", "scb10x/typhoon-7b", "pytorch", "pretrained", "th", "arxiv:2312.13951", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us", "base_model:MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1", "base_model:quantized:MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1", "conversational" ]
text-generation
2024-01-27T10:59:39Z
--- license: apache-2.0 tags: - quantized - 2-bit - 3-bit - 4-bit - 5-bit - 6-bit - 8-bit - GGUF - transformers - safetensors - mistral - text-generation - Safetensors - text-generation-inference - merge - 7b - mistralai/Mistral-7B-Instruct-v0.1 - scb10x/typhoon-7b - pytorch - pretrained - th - arxiv:2312.13951 - license:apache-2.0 - autotrain_compatible - endpoints_compatible - region:us model_name: typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF base_model: MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1 inference: false model_creator: MaziyarPanahi pipeline_tag: text-generation quantized_by: MaziyarPanahi --- # [MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF) - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi) - Original model: [MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1) ## Description [MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF) contains GGUF format model files for [MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1). ## How to use Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models: ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models. ### Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: [MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF) and below it, a specific filename to download, such as: typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` </details> <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download [MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 32768` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./typhoon-7b-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
alexboot/FallenShadowV2
alexboot
2024-01-27T10:59:10Z
0
0
null
[ "license:apache-2.0", "region:us" ]
null
2023-12-22T12:41:48Z
--- license: apache-2.0 --- the model has been trained with 5 hours of cleaned data. works pretty good for TTS aslong as your tts voice is high This is my first model so i hope its good. i think its good
LoneStriker/Fimbulvetr-10.7B-v1-8.0bpw-h8-exl2
LoneStriker
2024-01-27T10:54:11Z
6
2
transformers
[ "transformers", "safetensors", "llama", "text-generation", "en", "license:cc-by-nc-4.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-15T15:48:53Z
--- license: cc-by-nc-4.0 language: - en --- My current low-budget daily driver, so far. Frostwindv2 + Sensualize v1.1 + ___ data on uncen Instruct Solar. This is meant to be a verbose, smart Roleplaying model. I think I captured those two parts this time. Well, for my own cards and scenarios anyway, it passed with flying colours. I recommend using min-p, I liked Universal-Light preset in SillyTavern. Experimental. *** ### Prompt Format: Alpaca ``` ### Instruction: <Prompt> ### Input: <Insert Context Here> ### Response: ```
LoneStriker/Fimbulvetr-10.7B-v1-3.0bpw-h6-exl2
LoneStriker
2024-01-27T10:52:11Z
6
1
transformers
[ "transformers", "safetensors", "llama", "text-generation", "en", "license:cc-by-nc-4.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-15T15:38:14Z
--- license: cc-by-nc-4.0 language: - en --- My current low-budget daily driver, so far. Frostwindv2 + Sensualize v1.1 + ___ data on uncen Instruct Solar. This is meant to be a verbose, smart Roleplaying model. I think I captured those two parts this time. Well, for my own cards and scenarios anyway, it passed with flying colours. I recommend using min-p, I liked Universal-Light preset in SillyTavern. Experimental. *** ### Prompt Format: Alpaca ``` ### Instruction: <Prompt> ### Input: <Insert Context Here> ### Response: ```
MoulikBansal/fine-tuned-on-mcq-phi_1_5_new_version_1
MoulikBansal
2024-01-27T10:52:03Z
0
0
transformers
[ "transformers", "safetensors", "arxiv:1910.09700", "endpoints_compatible", "region:us" ]
null
2024-01-25T17:16:29Z
--- library_name: transformers tags: [] --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
finalyear2023/rohit_Sharma
finalyear2023
2024-01-27T10:46:22Z
2
1
diffusers
[ "diffusers", "tensorboard", "stable-diffusion-xl", "stable-diffusion-xl-diffusers", "text-to-image", "lora", "template:sd-lora", "base_model:stabilityai/stable-diffusion-xl-base-1.0", "base_model:adapter:stabilityai/stable-diffusion-xl-base-1.0", "license:openrail++", "region:us" ]
text-to-image
2024-01-27T10:46:14Z
--- tags: - stable-diffusion-xl - stable-diffusion-xl-diffusers - text-to-image - diffusers - lora - template:sd-lora base_model: stabilityai/stable-diffusion-xl-base-1.0 instance_prompt: a photo of TOK rohit license: openrail++ --- # SDXL LoRA DreamBooth - finalyear2023/rohit_Sharma <Gallery /> ## Model description These are finalyear2023/rohit_Sharma LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0. The weights were trained using [DreamBooth](https://dreambooth.github.io/). LoRA for the text encoder was enabled: False. Special VAE used for training: madebyollin/sdxl-vae-fp16-fix. ## Trigger words You should use a photo of TOK rohit to trigger the image generation. ## Download model Weights for this model are available in Safetensors format. [Download](finalyear2023/rohit_Sharma/tree/main) them in the Files & versions tab.
hojzas/setfit-proj8-multilabel_2
hojzas
2024-01-27T10:41:10Z
49
0
setfit
[ "setfit", "safetensors", "mpnet", "sentence-transformers", "text-classification", "generated_from_setfit_trainer", "dataset:hojzas/setfit-proj8-multilabel_2", "arxiv:2209.11055", "base_model:sentence-transformers/paraphrase-mpnet-base-v2", "base_model:finetune:sentence-transformers/paraphrase-mpnet-base-v2", "co2_eq_emissions", "region:us" ]
text-classification
2024-01-27T10:40:44Z
--- library_name: setfit tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer datasets: - hojzas/setfit-proj8-multilabel_2 metrics: - accuracy widget: - text: 'def first_with_given_key(iterable, key=lambda x: x):\n keys_used = {}\n for item in iterable:\n rp = repr(key(item))\n if rp not in keys_used.keys():\n keys_used[rp] = repr(item)\n yield item' - text: 'def first_with_given_key(iterable, key=lambda x: x):\n keys=[]\n for i in iterable:\n if key(i) not in keys:\n yield i\n keys.append(key(i))' - text: 'def first_with_given_key(iterable, key=repr):\n set_of_keys = set()\n lambda_key = (lambda x: key(x))\n for item in iterable:\n key = lambda_key(item)\n try:\n key_for_set = hash(key)\n except TypeError:\n key_for_set = repr(key)\n if key_for_set in set_of_keys:\n continue\n set_of_keys.add(key_for_set)\n yield item' - text: 'def first_with_given_key(iterable, key = lambda x: x):\n found_keys={}\n for i in iterable:\n if key(i) not in found_keys.keys():\n found_keys[key(i)]=i\n yield i' - text: 'def first_with_given_key(the_iterable, key=lambda x: x):\n temp_keys=[]\n for i in range(len(the_iterable)):\n if (key(the_iterable[i]) not in temp_keys):\n temp_keys.append(key(the_iterable[i]))\n yield the_iterable[i]\n del temp_keys' pipeline_tag: text-classification inference: false co2_eq_emissions: emissions: 0.26662775359268037 source: codecarbon training_type: fine-tuning on_cloud: false cpu_model: Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz ram_total_size: 251.49160385131836 hours_used: 0.005 base_model: sentence-transformers/paraphrase-mpnet-base-v2 --- # SetFit with sentence-transformers/paraphrase-mpnet-base-v2 This is a [SetFit](https://github.com/huggingface/setfit) model trained on the [hojzas/setfit-proj8-multilabel_2](https://huggingface.co/datasets/hojzas/setfit-proj8-multilabel_2) dataset that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) as the Sentence Transformer embedding model. A OneVsRestClassifier instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) - **Classification head:** a OneVsRestClassifier instance - **Maximum Sequence Length:** 512 tokens <!-- - **Number of Classes:** Unknown --> - **Training Dataset:** [hojzas/setfit-proj8-multilabel_2](https://huggingface.co/datasets/hojzas/setfit-proj8-multilabel_2) <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("hojzas/setfit-proj8-multilabel_2") # Run inference preds = model("def first_with_given_key(iterable, key=lambda x: x):\n keys=[]\n for i in iterable:\n if key(i) not in keys:\n yield i\n keys.append(key(i))") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### Out-of-Scope Use *List how the model may foreseeably be misused and address what users ought not to do with the model.* --> <!-- ## Bias, Risks and Limitations *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.* --> <!-- ### Recommendations *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.* --> ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 43 | 92.5185 | 125 | ### Training Hyperparameters - batch_size: (16, 16) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - body_learning_rate: (2e-05, 2e-05) - head_learning_rate: 2e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0147 | 1 | 0.2842 | - | | 0.7353 | 50 | 0.0045 | - | ### Environmental Impact Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon). - **Carbon Emitted**: 0.000 kg of CO2 - **Hours Used**: 0.005 hours ### Training Hardware - **On Cloud**: No - **GPU Model**: No GPU used - **CPU Model**: Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz - **RAM Size**: 251.49 GB ### Framework Versions - Python: 3.10.12 - SetFit: 1.0.3 - Sentence Transformers: 2.2.2 - Transformers: 4.36.1 - PyTorch: 2.1.2+cu121 - Datasets: 2.14.7 - Tokenizers: 0.15.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## Glossary *Clearly define terms in order to be accessible across audiences.* --> <!-- ## Model Card Authors *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* --> <!-- ## Model Card Contact *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.* -->
SivaResearch/tinyllama-Siv-v2
SivaResearch
2024-01-27T10:40:07Z
4
0
null
[ "tensorboard", "safetensors", "trl", "sft", "generated_from_trainer", "base_model:TinyLlama/TinyLlama-1.1B-Chat-v1.0", "base_model:finetune:TinyLlama/TinyLlama-1.1B-Chat-v1.0", "license:apache-2.0", "region:us" ]
null
2024-01-27T02:54:54Z
--- license: apache-2.0 base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 tags: - trl - sft - generated_from_trainer model-index: - name: tinyllama-Siv-v2 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. --> # tinyllama-Siv-v2 This model is a fine-tuned version of [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) on the None dataset. ## 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.0002 - train_batch_size: 4 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - training_steps: 2600 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
shareit/mistral-7b-instruct-v0.2-qlora-orcaplatypus
shareit
2024-01-27T10:36:46Z
0
0
peft
[ "peft", "safetensors", "arxiv:1910.09700", "base_model:mistralai/Mistral-7B-Instruct-v0.2", "base_model:adapter:mistralai/Mistral-7B-Instruct-v0.2", "region:us" ]
null
2024-01-27T10:23:57Z
--- library_name: peft base_model: mistralai/Mistral-7B-Instruct-v0.2 --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed] ## Training procedure The following `bitsandbytes` quantization config was used during training: - quant_method: QuantizationMethod.BITS_AND_BYTES - 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: bfloat16 ### Framework versions - PEFT 0.6.0.dev0
LoneStriker/Tess-10.7B-v1.5-8.0bpw-h8-exl2
LoneStriker
2024-01-27T10:31:04Z
3
0
transformers
[ "transformers", "pytorch", "llama", "text-generation", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T10:26:33Z
--- license: apache-2.0 --- <br> ![Tesoro](https://huggingface.co/migtissera/Tess-10.7B-v1.5/resolve/main/Tess-v1-5.png) <br> Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-10.7B-v1.5 was trained on the SOLAR-10.7B base. # Prompt Format: ``` SYSTEM: <ANY SYSTEM CONTEXT> USER: ASSISTANT: ```
badokorach/bert-finetuned-260124
badokorach
2024-01-27T10:30:12Z
63
0
transformers
[ "transformers", "tf", "bert", "question-answering", "generated_from_keras_callback", "base_model:badokorach/bert-finetuned-210124", "base_model:finetune:badokorach/bert-finetuned-210124", "endpoints_compatible", "region:us" ]
question-answering
2024-01-26T19:32:40Z
--- base_model: badokorach/bert-finetuned-210124 tags: - generated_from_keras_callback model-index: - name: badokorach/bert-finetuned-260124 results: [] --- <!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # badokorach/bert-finetuned-260124 This model is a fine-tuned version of [badokorach/bert-finetuned-210124](https://huggingface.co/badokorach/bert-finetuned-210124) on an unknown dataset. It achieves the following results on the evaluation set: - Train Loss: 0.0000 - Validation Loss: 0.0 - Epoch: 14 ## 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: - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 1e-05, 'decay_steps': 4560, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.02} - training_precision: mixed_float16 ### Training results | Train Loss | Validation Loss | Epoch | |:----------:|:---------------:|:-----:| | 0.0357 | 0.0 | 0 | | 0.0006 | 0.0 | 1 | | 0.0003 | 0.0 | 2 | | 0.0002 | 0.0 | 3 | | 0.0001 | 0.0 | 4 | | 0.0001 | 0.0 | 5 | | 0.0001 | 0.0 | 6 | | 0.0001 | 0.0 | 7 | | 0.0000 | 0.0 | 8 | | 0.0001 | 0.0 | 9 | | 0.0000 | 0.0 | 10 | | 0.0000 | 0.0 | 11 | | 0.0000 | 0.0 | 12 | | 0.0000 | 0.0 | 13 | | 0.0000 | 0.0 | 14 | ### Framework versions - Transformers 4.35.2 - TensorFlow 2.15.0 - Datasets 2.16.1 - Tokenizers 0.15.1
AmrutaMuthal/mero_controlnet
AmrutaMuthal
2024-01-27T10:29:45Z
4
0
diffusers
[ "diffusers", "tensorboard", "safetensors", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "controlnet", "base_model:runwayml/stable-diffusion-v1-5", "base_model:adapter:runwayml/stable-diffusion-v1-5", "license:creativeml-openrail-m", "region:us" ]
text-to-image
2024-01-21T16:36:09Z
--- license: creativeml-openrail-m base_model: runwayml/stable-diffusion-v1-5 tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - controlnet inference: true --- # controlnet-AmrutaMuthal/mero_controlnet These are controlnet weights trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.
mangoo111/repo_name
mangoo111
2024-01-27T10:27:08Z
100
0
transformers
[ "transformers", "tensorboard", "safetensors", "whisper", "automatic-speech-recognition", "hf-asr-leaderboard", "generated_from_trainer", "ko", "dataset:mangoo111/stt_datasets", "base_model:openai/whisper-base", "base_model:finetune:openai/whisper-base", "license:apache-2.0", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-27T06:06:03Z
--- language: - ko license: apache-2.0 base_model: openai/whisper-base tags: - hf-asr-leaderboard - generated_from_trainer datasets: - mangoo111/stt_datasets model-index: - name: AIHub_non-face-to-face-care_data_model 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. --> # AIHub_non-face-to-face-care_data_model This model is a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) on the AIHub_non-face-to-face-care_data dataset. It achieves the following results on the evaluation set: - Loss: 0.5251 - Cer: 91.7452 - Normalized Cer: 0.1147 ## 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: 1e-05 - train_batch_size: 16 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - training_steps: 4000 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Cer | Normalized Cer | |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------------:| | 0.6825 | 2.5 | 1000 | 0.7206 | 125.5376 | 0.1569 | | 0.4637 | 5.0 | 2000 | 0.4858 | 96.4728 | 0.1206 | | 0.34 | 7.5 | 3000 | 0.4926 | 92.8792 | 0.1161 | | 0.2378 | 10.0 | 4000 | 0.5251 | 91.7452 | 0.1147 | ### Framework versions - Transformers 4.38.0.dev0 - Pytorch 2.1.2+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
LoneStriker/Fimbulvetr-10.7B-v1-GGUF
LoneStriker
2024-01-27T10:26:44Z
475
6
null
[ "gguf", "en", "license:cc-by-nc-4.0", "endpoints_compatible", "region:us" ]
null
2024-01-27T09:36:35Z
--- license: cc-by-nc-4.0 language: - en --- My current low-budget daily driver, so far. Frostwindv2 + Sensualize v1.1 + ___ data on uncen Instruct Solar. This is meant to be a verbose, smart Roleplaying model. I think I captured those two parts this time. Well, for my own cards and scenarios anyway, it passed with flying colours. I recommend using min-p, I liked Universal-Light preset in SillyTavern. Experimental. *** ### Prompt Format: Alpaca ``` ### Instruction: <Prompt> ### Input: <Insert Context Here> ### Response: ```
LoneStriker/Tess-10.7B-v1.5-6.0bpw-h6-exl2
LoneStriker
2024-01-27T10:26:23Z
4
0
transformers
[ "transformers", "pytorch", "llama", "text-generation", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T10:19:29Z
--- license: apache-2.0 --- <br> ![Tesoro](https://huggingface.co/migtissera/Tess-10.7B-v1.5/resolve/main/Tess-v1-5.png) <br> Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-10.7B-v1.5 was trained on the SOLAR-10.7B base. # Prompt Format: ``` SYSTEM: <ANY SYSTEM CONTEXT> USER: ASSISTANT: ```
LoneStriker/Tess-10.7B-v1.5-4.0bpw-h6-exl2
LoneStriker
2024-01-27T10:13:54Z
4
0
transformers
[ "transformers", "pytorch", "llama", "text-generation", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T10:09:21Z
--- license: apache-2.0 --- <br> ![Tesoro](https://huggingface.co/migtissera/Tess-10.7B-v1.5/resolve/main/Tess-v1-5.png) <br> Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-10.7B-v1.5 was trained on the SOLAR-10.7B base. # Prompt Format: ``` SYSTEM: <ANY SYSTEM CONTEXT> USER: ASSISTANT: ```
ChikeJ/ppo-LunarLander-v2
ChikeJ
2024-01-27T10:13:10Z
0
0
stable-baselines3
[ "stable-baselines3", "LunarLander-v2", "deep-reinforcement-learning", "reinforcement-learning", "model-index", "region:us" ]
reinforcement-learning
2024-01-27T10:12:53Z
--- library_name: stable-baselines3 tags: - LunarLander-v2 - deep-reinforcement-learning - reinforcement-learning - stable-baselines3 model-index: - name: PPO results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: LunarLander-v2 type: LunarLander-v2 metrics: - type: mean_reward value: 271.34 +/- 17.30 name: mean_reward verified: false --- # **PPO** Agent playing **LunarLander-v2** This is a trained model of a **PPO** agent playing **LunarLander-v2** using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3). ## Usage (with Stable-baselines3) TODO: Add your code ```python from stable_baselines3 import ... from huggingface_sb3 import load_from_hub ... ```
LoneStriker/Tess-10.7B-v1.5-3.0bpw-h6-exl2
LoneStriker
2024-01-27T10:09:08Z
4
0
transformers
[ "transformers", "pytorch", "llama", "text-generation", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T09:46:00Z
--- license: apache-2.0 --- <br> ![Tesoro](https://huggingface.co/migtissera/Tess-10.7B-v1.5/resolve/main/Tess-v1-5.png) <br> Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-10.7B-v1.5 was trained on the SOLAR-10.7B base. # Prompt Format: ``` SYSTEM: <ANY SYSTEM CONTEXT> USER: ASSISTANT: ```
LoneStriker/Tess-10.7B-v1.5-GGUF
LoneStriker
2024-01-27T10:05:31Z
1
0
null
[ "gguf", "license:apache-2.0", "endpoints_compatible", "region:us" ]
null
2024-01-27T09:26:19Z
--- license: apache-2.0 --- <br> ![Tesoro](https://huggingface.co/migtissera/Tess-10.7B-v1.5/resolve/main/Tess-v1-5.png) <br> Tess, short for Tesoro (Treasure in Italian), is a general purpose Large Language Model series. Tess-10.7B-v1.5 was trained on the SOLAR-10.7B base. # Prompt Format: ``` SYSTEM: <ANY SYSTEM CONTEXT> USER: ASSISTANT: ```
MohamedAAK/my_awesome_eli5_clm-model
MohamedAAK
2024-01-27T10:01:48Z
47
0
transformers
[ "transformers", "tf", "gpt2", "text-generation", "generated_from_keras_callback", "base_model:distilbert/distilgpt2", "base_model:finetune:distilbert/distilgpt2", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T07:38:32Z
--- license: apache-2.0 base_model: distilgpt2 tags: - generated_from_keras_callback model-index: - name: MohamedAAK/my_awesome_eli5_clm-model results: [] --- <!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # MohamedAAK/my_awesome_eli5_clm-model This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on an unknown dataset. It achieves the following results on the evaluation set: - Train Loss: 3.9106 - Validation Loss: 3.8529 - Epoch: 2 ## 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: - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': 2e-05, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.01} - training_precision: float32 ### Training results | Train Loss | Validation Loss | Epoch | |:----------:|:---------------:|:-----:| | 4.8400 | 3.9280 | 0 | | 3.9787 | 3.8754 | 1 | | 3.9106 | 3.8529 | 2 | ### Framework versions - Transformers 4.35.2 - TensorFlow 2.15.0 - Datasets 2.16.1 - Tokenizers 0.15.1
devhyun88/hyun-mistral-7b-orca-platypus-refine
devhyun88
2024-01-27T10:01:33Z
56
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "ko", "license:cc-by-sa-4.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-26T00:53:06Z
--- license: cc-by-sa-4.0 language: - ko --- we fine-tune this model based on mistral-7b-v0.1 # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("devhyun88/hyun-mistral-7b-orca-platypus-refine") model = AutoModelForCausalLM.from_pretrained("devhyun88/hyun-mistral-7b-orca-platypus-refine")
Shaleen123/medical-yi
Shaleen123
2024-01-27T09:57:24Z
72
0
transformers
[ "transformers", "safetensors", "llama", "text-generation", "arxiv:1910.09700", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "4-bit", "bitsandbytes", "region:us" ]
text-generation
2024-01-27T09:55:06Z
--- library_name: transformers tags: [] --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
farzintava/rl_course_vizdoom_health_gathering_supreme
farzintava
2024-01-27T09:38:24Z
0
0
sample-factory
[ "sample-factory", "tensorboard", "deep-reinforcement-learning", "reinforcement-learning", "model-index", "region:us" ]
reinforcement-learning
2024-01-27T09:38:18Z
--- library_name: sample-factory tags: - deep-reinforcement-learning - reinforcement-learning - sample-factory model-index: - name: APPO results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: doom_health_gathering_supreme type: doom_health_gathering_supreme metrics: - type: mean_reward value: 8.75 +/- 3.41 name: mean_reward verified: false --- A(n) **APPO** model trained on the **doom_health_gathering_supreme** environment. This model was trained using Sample-Factory 2.0: https://github.com/alex-petrenko/sample-factory. Documentation for how to use Sample-Factory can be found at https://www.samplefactory.dev/ ## Downloading the model After installing Sample-Factory, download the model with: ``` python -m sample_factory.huggingface.load_from_hub -r farzintava/rl_course_vizdoom_health_gathering_supreme ``` ## Using the model To run the model after download, use the `enjoy` script corresponding to this environment: ``` python -m .usr.local.lib.python3.10.dist-packages.colab_kernel_launcher --algo=APPO --env=doom_health_gathering_supreme --train_dir=./train_dir --experiment=rl_course_vizdoom_health_gathering_supreme ``` You can also upload models to the Hugging Face Hub using the same script with the `--push_to_hub` flag. See https://www.samplefactory.dev/10-huggingface/huggingface/ for more details ## Training with this model To continue training with this model, use the `train` script corresponding to this environment: ``` python -m .usr.local.lib.python3.10.dist-packages.colab_kernel_launcher --algo=APPO --env=doom_health_gathering_supreme --train_dir=./train_dir --experiment=rl_course_vizdoom_health_gathering_supreme --restart_behavior=resume --train_for_env_steps=10000000000 ``` Note, you may have to adjust `--train_for_env_steps` to a suitably high number as the experiment will resume at the number of steps it concluded at.
vierlinglukas/ppo_stickthing
vierlinglukas
2024-01-27T09:25:50Z
0
0
null
[ "tensorboard", "LunarLander-v2", "ppo", "deep-reinforcement-learning", "reinforcement-learning", "custom-implementation", "deep-rl-course", "model-index", "region:us" ]
reinforcement-learning
2024-01-27T09:25:42Z
--- tags: - LunarLander-v2 - ppo - deep-reinforcement-learning - reinforcement-learning - custom-implementation - deep-rl-course model-index: - name: PPO results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: LunarLander-v2 type: LunarLander-v2 metrics: - type: mean_reward value: -216.04 +/- 165.88 name: mean_reward verified: false --- # PPO Agent Playing LunarLander-v2 This is a trained model of a PPO agent playing LunarLander-v2. # Hyperparameters ```python {'exp_name': 'ppo' 'seed': 1 'torch_deterministic': True 'cuda': True 'track': False 'wandb_project_name': 'cleanRL' 'wandb_entity': None 'capture_video': False 'env_id': 'LunarLander-v2' 'total_timesteps': 50000 'learning_rate': 0.00025 'num_envs': 4 'num_steps': 128 'anneal_lr': True 'gae': True 'gamma': 0.99 'gae_lambda': 0.95 'num_minibatches': 4 'update_epochs': 4 'norm_adv': True 'clip_coef': 0.2 'clip_vloss': True 'ent_coef': 0.01 'vf_coef': 0.5 'max_grad_norm': 0.5 'target_kl': None 'repo_id': 'vierlinglukas/ppo_stickthing' 'batch_size': 512 'minibatch_size': 128} ```
yoshinori-sano/NeuralHermes-2.5-Mistral-7B
yoshinori-sano
2024-01-27T09:14:40Z
5
0
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "conversational", "arxiv:1910.09700", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T09:08:29Z
--- library_name: transformers tags: [] --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
anum231/cancer_classifier
anum231
2024-01-27T09:07:54Z
48
0
transformers
[ "transformers", "tf", "vit", "image-classification", "generated_from_keras_callback", "base_model:google/vit-base-patch16-224-in21k", "base_model:finetune:google/vit-base-patch16-224-in21k", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
image-classification
2024-01-27T08:14:47Z
--- license: apache-2.0 base_model: google/vit-base-patch16-224-in21k tags: - generated_from_keras_callback model-index: - name: anum231/cancer_classifier results: [] --- <!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # anum231/cancer_classifier This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset. It achieves the following results on the evaluation set: - Train Loss: 0.9100 - Validation Loss: 0.9439 - Train Accuracy: 0.5862 - Epoch: 4 ## 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: - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 3e-05, 'decay_steps': 1160, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01} - training_precision: float32 ### Training results | Train Loss | Validation Loss | Train Accuracy | Epoch | |:----------:|:---------------:|:--------------:|:-----:| | 1.0608 | 1.0304 | 0.4828 | 0 | | 1.0179 | 1.0202 | 0.4828 | 1 | | 0.9865 | 1.0000 | 0.4828 | 2 | | 0.9464 | 0.9694 | 0.5690 | 3 | | 0.9100 | 0.9439 | 0.5862 | 4 | ### Framework versions - Transformers 4.35.2 - TensorFlow 2.15.0 - Datasets 2.16.1 - Tokenizers 0.15.1
FounderOfHuggingface/gpt2-large_lora_r4_e2e_nlg_t42000_e5
FounderOfHuggingface
2024-01-27T09:02:42Z
0
0
peft
[ "peft", "safetensors", "arxiv:1910.09700", "base_model:openai-community/gpt2-large", "base_model:adapter:openai-community/gpt2-large", "region:us" ]
null
2024-01-27T09:02:38Z
--- library_name: peft base_model: gpt2-large --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> [More Information Needed] ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed] ### Framework versions - PEFT 0.7.1
LoneStriker/Etheria-55b-v0.1-6.0bpw-h6-exl2
LoneStriker
2024-01-27T08:57:20Z
4
0
transformers
[ "transformers", "safetensors", "llama", "text-generation", "mergekit", "merge", "arxiv:2311.03099", "arxiv:2306.01708", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
text-generation
2024-01-27T08:39:33Z
--- base_model: [] tags: - mergekit - merge --- # Steelskull/Etheria-55b-v0.1 ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64545af5ec40bbbd01242ca6/RAhrbktyyVQxOR1np-9L2.png) ## Merge Details An attempt to make a functional goliath style merge to create a [Etheria] 55b-200k with two yi-34b-200k models. due to the merge it 'theoretically' should have a context of 200k but I recommend starting at 32k and moveing up, as it is unknown (at this time) what the merge has done to the context length. This is a merge of both VerA and VerB of Etheria-55b (There numbers were surprisingly good), I then created a sacrificial 55B out of the most performant yi-34b-200k Model and performed a Dare_ties merge and equalize the model into its current state. ### Merge Method This model was merged using the [DARE](https://arxiv.org/abs/2311.03099) [TIES](https://arxiv.org/abs/2306.01708) merge method using Merged-Etheria-55b as a base. ### Configuration The following YAML configuration was used to produce this model: ```yaml base_model: Merged-Etheria-55b models: - model: Sacr-Etheria-55b parameters: weight: [0.22, 0.113, 0.113, 0.113, 0.113, 0.113] density: 0.61 - model: Merged-Etheria-55b parameters: weight: [0.22, 0.113, 0.113, 0.113, 0.113, 0.113] density: 0.61 merge_method: dare_ties tokenizer_source: union parameters: int8_mask: true dtype: bfloat16 ```
mlx-community/Mixtral-8x7B-v0.1-hf-4bit-mlx
mlx-community
2024-01-27T08:52:21Z
17
5
mlx
[ "mlx", "mixtral", "moe", "fr", "it", "de", "es", "en", "license:apache-2.0", "region:us" ]
null
2024-01-18T08:27:28Z
--- language: - fr - it - de - es - en license: apache-2.0 tags: - moe - mlx --- # mlx-community/Mixtral-8x7B-v0.1-hf-4bit-mlx This model was converted to MLX format from [`mistralai/Mixtral-8x7B-v0.1`](). Refer to the [original model card](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1) for more details on the model. ## Use with mlx ```bash pip install mlx-lm ``` ```python from mlx_lm import load, generate model, tokenizer = load("mlx-community/Mixtral-8x7B-v0.1-hf-4bit-mlx") response = generate(model, tokenizer, prompt="hello", verbose=True) ```
MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF
MaziyarPanahi
2024-01-27T08:50:06Z
40
0
transformers
[ "transformers", "gguf", "mistral", "quantized", "2-bit", "3-bit", "4-bit", "5-bit", "6-bit", "8-bit", "GGUF", "safetensors", "text-generation", "Safetensors", "text-generation-inference", "merge", "7b", "mistralai/Mistral-7B-Instruct-v0.1", "Kiddyz/testllm-c2", "pytorch", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us", "base_model:MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1", "base_model:quantized:MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1", "conversational" ]
text-generation
2024-01-27T08:41:25Z
--- license: apache-2.0 tags: - quantized - 2-bit - 3-bit - 4-bit - 5-bit - 6-bit - 8-bit - GGUF - transformers - safetensors - mistral - text-generation - Safetensors - text-generation-inference - merge - 7b - mistralai/Mistral-7B-Instruct-v0.1 - Kiddyz/testllm-c2 - pytorch - en - license:apache-2.0 - autotrain_compatible - endpoints_compatible - region:us model_name: testllm-c2-Mistral-7B-Instruct-v0.1-GGUF base_model: MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1 inference: false model_creator: MaziyarPanahi pipeline_tag: text-generation quantized_by: MaziyarPanahi --- # [MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF) - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi) - Original model: [MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1) ## Description [MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF) contains GGUF format model files for [MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1). ## How to use Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models: ### About GGUF GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. Here is an incomplete list of clients and libraries that are known to support GGUF: * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling. * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel. * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023. * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection. * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server. * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use. * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models. ### Explanation of quantisation methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw ## How to download GGUF files **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file. The following clients/libraries will automatically download models for you, providing a list of available models to choose from: * LM Studio * LoLLMS Web UI * Faraday.dev ### In `text-generation-webui` Under Download Model, you can enter the model repo: [MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF) and below it, a specific filename to download, such as: testllm-c2-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf. Then click Download. ### On the command line, including multiple files at once I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` Then you can download any individual model file to the current directory, at high speed, with a command like this: ```shell huggingface-cli download MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF testllm-c2-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` </details> <details> <summary>More advanced huggingface-cli download usage (click to read)</summary> You can also download multiple files at once with a pattern: ```shell huggingface-cli download [MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf' ``` For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/testllm-c2-Mistral-7B-Instruct-v0.1-GGUF testllm-c2-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> ## Example `llama.cpp` command Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later. ```shell ./main -ngl 35 -m testllm-c2-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant" ``` Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration. Change `-c 32768` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp). ## How to run from Python code You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python. ### How to load this model in Python code, using llama-cpp-python For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/). #### First install the package Run one of the following commands, according to your system: ```shell # Base ctransformers with no GPU acceleration pip install llama-cpp-python # With NVidia CUDA acceleration CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # Or with OpenBLAS acceleration CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Or with CLBLast acceleration CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python # Or with AMD ROCm GPU acceleration (Linux only) CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # Or with Metal GPU acceleration for macOS systems only CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA: $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" pip install llama-cpp-python ``` #### Simple llama-cpp-python example code ```python from llama_cpp import Llama # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system. llm = Llama( model_path="./testllm-c2-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", # Download the model file first n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available ) # Simple inference example output = llm( "<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant", # Prompt max_tokens=512, # Generate up to 512 tokens stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using. echo=True # Whether to echo the prompt ) # Chat Completion API llm = Llama(model_path="./testllm-c2-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using llm.create_chat_completion( messages = [ {"role": "system", "content": "You are a story writing assistant."}, { "role": "user", "content": "Write a story about llamas." } ] ) ``` ## How to use with LangChain Here are guides on using llama-cpp-python and ctransformers with LangChain: * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp) * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
kosamit/whisper-tiny-ja-alicia
kosamit
2024-01-27T08:47:42Z
69
0
transformers
[ "transformers", "pytorch", "whisper", "automatic-speech-recognition", "generated_from_trainer", "base_model:kosamit/whisper-tiny-ja", "base_model:finetune:kosamit/whisper-tiny-ja", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
2024-01-26T19:00:35Z
--- tags: - generated_from_trainer base_model: kosamit/whisper-tiny-ja metrics: - wer model-index: - name: whisper-tiny-ja-alicia 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. --> 「アリシア」という単語を学習させたモデル。 # whisper-tiny-ja-alicia This model was trained from scratch on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.5542 - Wer: 85.7143 ## 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: 1e-05 - train_batch_size: 8 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 10 - training_steps: 40 ### Training results | Training Loss | Epoch | Step | Validation Loss | Wer | |:-------------:|:-----:|:----:|:---------------:|:-------:| | 0.0311 | 3.33 | 10 | 0.3741 | 85.7143 | | 0.0012 | 6.67 | 20 | 0.4759 | 85.7143 | | 0.0001 | 10.0 | 30 | 0.5351 | 85.7143 | | 0.0 | 13.33 | 40 | 0.5542 | 85.7143 | ### Framework versions - Transformers 4.33.2 - Pytorch 2.1.1+cu118 - Datasets 2.16.1 - Tokenizers 0.13.3