Dcard Sentiment Fine-tuning (Chinese)
Online Experience
Results
Data Description
Dcard is a Taiwanese community forum that organizes posts into topic sections. This project collected posts from Dcard's sentiment section and fine-tuned a model on LLaMA using this data.
Brief Introduction
This project collected text data from Dcard's sentiment section, converted it to plain text, and then fine-tuned the P01son/Linly-Chinese-LLaMA-7b-hf model.
Tutorial
Fine-tune the Model
Install text-generation-webui
Follow the installation guide for text-generation-webui to install it.
Launch text-generation-webui and select the Model tab from the top options
In the Model tab, enter P01son/Linly-Chinese-LLaMA-7b-hf, then click Download to download the base model (you can also manually download the model and place it in the models directory of the text-generation-webui installation)
Download the prepared dcard dataset and place it in the training/datasets directory of the text-generation-webui installation
Switch to the training tab in text-generation-webui
Select the dcard dataset
Switch to the Raw text file option and select the dcard dataset
Start training
Use the default parameters for training. If you want to increase the context length, you can increase the cutoff parameter.
Click Start LoRA Training to begin training.
You can see the training progress in text-generation-webui.
Wait for the model to finish training. This usually takes 1-8 hours.
The output of the training process is saved in the lora directory. You can also interrupt the training process and use the existing checkpoint model in the lora directory.
Use the Model
Manually create a folder named dcard_m in the lora directory.
Copy the latest checkpoint model from the folder to the lora directory.
Use the Fine-tuned Model
Switch to the Model tab and select the model first
Select LoRA. If LoRA does not appear, click the refresh button on the right or check if the LoRA model has been placed in the LoRA directory of text-generation-webui.
Apply LoRA by clicking Apply the selected LoRAs.
After successful application, a prompt will appear.
Use the Model
Switch to the Text generation tab, enter the beginning of the story, and click Generate to automatically generate the rest of the story on the right.