Guanaco-leh-V2: A Multilingual Instruction-Following Language Model Based on LLaMA 7B
This model is trained with
guanaco-lora
with lora + embed_tokens + lm_head be trained.
The dataset is from
alpaca-cleaned
and
guanaco
.
With trained embed and head, the model perform better at Chinese and Japanese then original LLaMA, and with instruction based prompt. You can use this model more easily.
Since this model is trained by guanaco dataset, you can also use this as chatbot. just use this format:
And since the train data has more chat-based data.
This model is more fit in chatbot usage.
Try this model:
You can try this model with this
colab
.
Or using generate.py in the
guanaco-lora
, all the examples are generated by guanaco-lora.
If you want to use the lora model from guanaco-7b-leh-v2-adapter/ , remember to turn off the load_in_8bit, or manually merge it into 7B model!
Recommend Generation parameters:
temperature: 0.5~0.7
top p: 0.65~1.0
top k: 30~50
repeat penalty: 1.03~1.17
Training Setup
2x3090 with model parallel
batch size = bsz 8 * grad acc 16 = 128
ctx cut off length = 1024
only train on output (with loss mask)
enable group of len
538k entries, 2epoch (about 8400 step)
lr 2e-4
Some Example
(As you can see, although guanaco can reply fluently, the content is quite confusing. So you may want to add some thing in the system part.)
I use guanaco with instruction to let it translate a chinese article to JP/DE/EN.
And use gpt-4 to scoring them and get this:
Some more information
Why use lora+embed+head
First, I think it is obvious that when a LLM isn't good at some language and you want to ft for it. You should train the embed and head part.
But the question is: "Why not just native finetune?"
If you have searched for some alpaca model or training thing, you may notice that lot of them has 1 problem: "memorize".
The loss will drop at the begin of every epoch, just like some kind of "overfit".
And in my opinion, this is because that the number of params of LLaMA is too large. So it just memorize all the training data.
But if I use lora for attention part(ignore MLP part), the param number is not large enough for "memorizing training data", so it is more unlikely to memorize all the things.
Runs of KBlueLeaf guanaco-7b-leh-v2 on huggingface.co
62
Total runs
0
24-hour runs
0
3-day runs
5
7-day runs
12
30-day runs
More Information About guanaco-7b-leh-v2 huggingface.co Model
guanaco-7b-leh-v2 huggingface.co is an AI model on huggingface.co that provides guanaco-7b-leh-v2's model effect (), which can be used instantly with this KBlueLeaf guanaco-7b-leh-v2 model. huggingface.co supports a free trial of the guanaco-7b-leh-v2 model, and also provides paid use of the guanaco-7b-leh-v2. Support call guanaco-7b-leh-v2 model through api, including Node.js, Python, http.
guanaco-7b-leh-v2 huggingface.co is an online trial and call api platform, which integrates guanaco-7b-leh-v2's modeling effects, including api services, and provides a free online trial of guanaco-7b-leh-v2, you can try guanaco-7b-leh-v2 online for free by clicking the link below.
KBlueLeaf guanaco-7b-leh-v2 online free url in huggingface.co:
guanaco-7b-leh-v2 is an open source model from GitHub that offers a free installation service, and any user can find guanaco-7b-leh-v2 on GitHub to install. At the same time, huggingface.co provides the effect of guanaco-7b-leh-v2 install, users can directly use guanaco-7b-leh-v2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.