banban-beta-v2 / README.md
asadfgglie's picture
Update README.md
6dd19b4 verified
---
library_name: transformers
tags:
- llama-factory
- BanBan
- 板板
language:
- en
- zh
datasets:
- asadfgglie/BanBan-generated-dataset-v1
- asadfgglie/BanBan_2024-7-1_v1
pipeline_tag: image-text-to-text
---
# asadfgglie/banban-beta-v2
<!-- Provide a quick summary of what the model is/does. -->
AI VTuber板板模型。
目標是打造屬於NTNU VLSI的專屬AI VT!
目前僅開放給NTNU VLSI社員。如果你是社員,並想要取得本模型的權重,請至[Discord](https://discord.gg/kN8fNbscZR)聯繫我。
這個模型主要是使用了大量的AI合成資料來做訓練,輔以少量的人類數據來做訓練。
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [asadfgglie](https://huggingface.co/asadfgglie)
- **Funded by:** [asadfgglie](https://huggingface.co/asadfgglie)
- **Shared by:** [asadfgglie](https://huggingface.co/asadfgglie)
- **Model type:** llava
- **Language(s) (NLP):** Image-text-to-text
- **License:** 僅供NTNU VLSI社員內部研究使用
- **Finetuned from model:** [xtuner/llava-llama-3-8b-v1_1-transformers](https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers)
## 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. -->
~~接觸板板,理解板板,成為板板~~
主要用於聊天與VT直播用,但目前能力僅供聊天用
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
你可以直接拿來當普通的AI助手來用,嗯,帶點食品偏好~~鳳梨狂熱~~的助手
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
關於一些政治類問題我不建議你去問板板,主要原因是基底模型Llama3本身就被訓練會避開這些問題回答。
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
板板是一名狂熱的鳳梨披薩支持者,從現在是,以後未來也是。這是直接寫在訓練集與prompt中的設定,屬於刻在DNA裡的印記,是神聖不可分割的一部分!
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
你必須接受鳳梨披薩才能理解板板
## How to Get Started with the Model
首先你需要根據你的電腦硬體情況選擇模型。
你可以在[Files and versions](https://huggingface.co/asadfgglie/banban-beta-v0-gguf/tree/main)中挑選結尾有帶gguf附檔名的檔案,這是模型的權重檔案。
其中比較特殊的是`mmproj-model-f16.gguf`,這是讓板板睜眼的clip權重檔案。若你有讓板板睜眼的需求,記得別忘了下載這個檔案。
這是經過gguf量化後的模型,因此可以用在任何支援llama.cpp的部屬環境中。
關於如何選擇模型尺寸,最簡單的建議是將模型權重的檔案大小乘以2,如果你的顯卡專屬記憶體容量大於這個數,那你可以放心選擇。
至於各種不同量化設定對於模型智力與速度的影響,各位可以簡單理解為:模型權重檔案越大,模型精度就越高,能力就越強,速度也就越慢。對於至少有6B顯卡專屬記憶體(RTX 3050 6G、RTX 4060),我推薦使用Q3量化級別的模型已取得最佳速度,並且保證不會有顯卡記憶體不足的問題,只要你別開著模型的同時打遊戲。
對於有10G或以上顯卡記憶體,可以選擇Q4、Q5級別的量化,這是在速度與性能上達到良好平衡的量化版本。
至於Q6、Q8,我建議是RTX 4080,但Q6量化有16G顯卡記憶體的話可以嘗試一下,應該能行。
F16則是原始精度,只是以gguf格式儲存,有RTX 4090玩過後可以告訴我效果如何。理論上應該會比我自己測試時還要好。因為我只能用量化過後的模型來測試QQ。
對於不會寫程式,只想嘗鮮的新手們,我的建議是[LM Studio](https://lmstudio.ai/),這個免費的專案可以很方便地幫你搞定一切麻煩的設定,只是沒辦法使用自定義名稱,因此可能會無法體驗到最佳的對話效果。同時別忘了`mmproj-model-f16.gguf`這個板板的眼睛!
(主要是因為這東西還沒把內部的對話紀錄儲存格式更新到與openAI最新版API相同的模樣,最新版的openAI API已經支援定義每個message的作者名稱設定了,llama3本身也設計過prompt格式,也有限度的支援自定義作者名稱)
如果你選擇使用[oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui)來做為你的推理平台,由於這個專案本身不支援對`llama.cpp`的多模態功能,因此板板只能生活在文字背後(~~當一個躲在鍵盤後的鍵盤俠~~)
## Technical Specifications
### Model Architecture and Objective
LlavaForConditionalGeneration, turn base model into llama3
### Compute Infrastructure
#### Hardware
CPU: Intel(R) Core(TM) i5-14400
GPU: NVIDIA GeForce RTX 4060 Ti 16G
RAM: 32G
#### Software
感謝偉大的[hiyouga/LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)讓我省下了大把稿基建的時間
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 16
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- num_epochs: 3.0
### Training results
| Training Loss | Epoch | Step | Validation Loss | Input Tokens Seen |
|:-------------:|:------:|:----:|:---------------:|:-----------------:|
| 1.2315 | 0.4168 | 100 | 1.1917 | 1551832 |
| 1.0165 | 0.8336 | 200 | 1.0467 | 3072864 |
| 0.8943 | 1.2503 | 300 | 0.9339 | 4609344 |
| 0.7505 | 1.6671 | 400 | 0.8318 | 6138408 |
| 0.577 | 2.0839 | 500 | 0.7647 | 7672440 |
| 0.5811 | 2.5007 | 600 | 0.7326 | 9211432 |
| 0.5544 | 2.9174 | 700 | 0.7245 | 10741104 |
| mratics | score |
|:------------------------------:|:------------------:|
| predict_bleu-4 | 22.36944225630876 |
| predict_model_preparation_time | 0.0048 |
| predict_rouge-1 | 41.827983993072735 |
| predict_rouge-2 | 21.250519792182086 |
| predict_rouge-l | 36.58219059871351 |
| predict_runtime | 55992.1102 |
| predict_samples_per_second | 0.072 |
| predict_steps_per_second | 0.072 |
### Framework versions
- PEFT 0.11.1
- Transformers 4.43.2
- Pytorch 2.3.0+cu121
- Datasets 2.19.2
- Tokenizers 0.19.1