Mark Ku's Blog
Podcast ConversationAI dialogue version of this article · Mandarin audio
Audio for this article is powered by VoAIVoAI

Picking Up from the Previous Llama Factory Fine-Tuning

First, I plan to use a local dataset for training

Define the training file acer_faqs.json in the local faqs folder

[
  {
    "instruction": "Explain how much a good gaming PC costs.",
    "input": "How much is a good gaming PC?",
    "output": "There are many ways to define a good gaming PC, as different gamers have different needs. At Acer, you can purchase a solid, entry-level gaming PC for as little as $849. If you are looking for a high-performance PC that can handle the highest resolutions at high speeds, a good gaming PC would be around $4,000. On average, good gaming PCs range between $1,000 and $4,000."
  },
  {
    "instruction": "List some good gaming PC options.",
    "input": "What are good gaming PCs?",
    "output": "Many manufacturers and builders offer good gaming PCs with quality components. Acer has a large inventory of great gaming PCs, including both Intel and AMD desktops. The latest 12th generation Intel desktops and Ryzen 9 desktops each provide some of the most seamless gaming experiences."
  },
  {
    "instruction": "Define what a gaming PC is.",
    "input": "What is a gaming PC?",
    "output": "Gaming PCs are specially designed personal computers made for playing video games with high quality. They are more powerful and have more advanced components than typical computers to provide better graphics and working memory to handle the load of running games."
  },
  {
    "instruction": "Where can someone buy a gaming PC?",
    "input": "Where to buy a gaming PC?",
    "output": "When considering buying a gaming PC, you have many options between in-store and online retailers. Acer offers great deals and discounts on gaming PCs that use top-tier components."
  }
]

Next, place the training data folder into LLaMA-Factory\data\

data set folder
data set folder

Modify dataset_info.json to include the file we just defined. The acer_faqs dataset will then appear in the dataset dropdown menu.

{
....
"acer_faqs": {
    "file_name": "acer_faqs.json"
  }  
...
}

Of course, you can also get open-source datasets to train your AI.

Huggingface's dataset

You can also use open-source datasets to train your AI model by modifying dataset_info.json.

Starting the Training

Starting the training with a TUF RTX 3080 10g
Starting the training with a TUF RTX 3080 10g

Next, let's test the fine-tuned AI model

image I tried a few datasets, including the default wiki_faq dataset. It was pretty funny watching the AI I spent half a day training just spout nonsense.

A quick Google search revealed that many people have run into this issue of nonsensical answers. I suspect that the VRAM on a typical PC graphics card is only sufficient for training these stripped-down versions of open-source models. To get more accurate results, you probably need to use the full model and train it on dedicated AI chips.

hardware requirement
hardware requirement

Final Thoughts

After watching the AI I spent half a day training do nothing but give nonsensical answers, it seems that if the goal is to build a functional AI bot, using pre-trained models and AI Agent technologies is a much more achievable path for now.

To train an AI yourself, you need a massive amount of data. Fine-tuning large open-source models has steep requirements for graphics cards, and there are many complex parameters to learn. I don't think AI training technology is yet easy enough to operate or accessible enough for the average company to readily adopt. It makes you wonder just how much money and effort were poured into building the major AI models we see today.

I'm a complete beginner when it comes to AI training, so if I've misunderstood anything, please feel free to discuss it in the comments or send me a private message.

Author

Mark Ku

擁有 10+ 年經驗的資深軟體工程師,現為 AI 應用 Builder,專注於大型平台架構與簡化複雜系統設計,從電商系統到訂閱與收費平台,結合 AI Agent、AI 整合與自動化開發,打造高效率且可持續演進的產品技術基礎。Read More

Found this useful?

The author's free tools, daily podcasts and newsletter are all here.

Mark Ku · This article is licensed under CC BY 4.0. Credit the author and link back to the original when reusing it.

Comments

Subscribe to Newsletter

Subscribe to get new posts delivered instantly — never miss a tech share.

By submitting, you agree to receive emails. You can anytime.

Popular Posts

View all
Mark Ku
··602

Oracle Cloud Always Free Tier: Linux Host and Static IP for a $0 Cloud Solution

Oracle Cloud Always Free Tier: Linux Host and Static IP for a $0 Cloud Solution
Mark Ku
··490

Say Goodbye to Postman's Fee Trap! A Hands-on Guide to Bruno, the Open-Source Git-Native API Testing Powerhouse.

Say Goodbye to Postman's Fee Trap! A Hands-on Guide to Bruno, the Open-Source Git-Native API Testing Powerhouse.
Mark Ku
··333

A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki

A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki
Mark Ku
··264

Training Your Own AI Voice: Hardware Requirements, Open-Source Model Comparison, and LoRA Fine-Tuning

Training Your Own AI Voice: Hardware Requirements, Open-Source Model Comparison, and LoRA Fine-Tuning
Mark Ku
··221

Building an Efficient API Management Platform: Deploying Kong Gateway from Scratch - Part 1

Building an Efficient API Management Platform: Deploying Kong Gateway from Scratch - Part 1
Mark Ku
··215

Setting Up Samba on Ubuntu to Share Folders with Windows 11

Setting Up Samba on Ubuntu to Share Folders with Windows 11