🚀 LLaMA Traditional Chinese 120M
A small bilingual (Traditional Chinese, English) pre-trained language model.
Despite the booming development of Generative AI, there is still a shortage of small Chinese models, especially those for Traditional Chinese. Some models trained on Chinese corpora have not optimized their tokenizers for Chinese.
This model uses a BPE tokenizer retrained on Chinese and English corpora, which can effectively support word segmentation for both Chinese (Simplified and Traditional) and English.
Traditional Chinese datasets are still difficult to obtain. As an alternative, we used Simplified Chinese datasets with a Simplified-to-Traditional conversion method for training. Preliminary observations show that the model's output tends to favor Chinese content.
Since English is often mixed in Chinese scenarios, we also added English (40% proportion) to the training corpus. In total, 15B tokens were trained on this model.
✨ Features
- Bilingual Support: Supports both Traditional Chinese and English.
- Optimized Tokenizer: Uses a BPE tokenizer retrained on Chinese and English corpora.
- Multilingual Training: Trains on a combination of Chinese and English datasets.
📦 Installation
No installation steps are provided in the original document, so this section is skipped.
💻 Usage Examples
No code examples are provided in the original document, so this section is skipped.
📚 Documentation
Training Dataset
- Chinese Wikipedia (20230601)
- English Wikipedia (20230601)
- Wudao Dataset (Simplified -> Traditional conversion)
- C4-RealNewsLike
ZH-BPE Tokenizer
This model uses a BPE tokenizer retrained on Chinese and English corpora.
https://github.com/p208p2002/BPE-tokenizer-from-zh-wiki
Test Data
Jean-Jacques Rousseau (French: Jean-Jacques Rousseau, French pronunciation: [ʒɑ̃ ʒak ʁuso]; June 28, 1712 – July 2, 1778) was a French and Genevan philosopher, political theorist, writer, and musician of the Enlightenment era.
Rousseau's novel Émile is a philosophical treatise on holistic civic education, which had a great influence on Kant. His romantic novel Julie, or the New Heloise was very important for the development of pre-romanticism and romantic novels.
However, some well-known scholars believe that although Rousseau foreshadowed the birth of romanticism, his "modern literary stance" actually "transcended sentimental romanticism," and his new view of language even "extended all the way to surrealism."
LLaMA Chinese 120M (ours)
▁ <0x0A> ▁ ▁ ▁ ▁尚 - 雅克 · 盧 梭 ( 法語 : Jean - Jac ques ▁R ous se au , 法語 發音 : [ <0xCA> <0x92> ɑ ̃ ▁ <0xCA> <0x92> ak ▁ ʁ us o ] <0xEF> <0xBC> <0x9B> 1 7 1 2 年 6 月 2 8 日 — 1 7 7 8 年 7 月 2 日 ) 是 啟蒙 時代的 法國 與 日內瓦 哲學家 、 政治 理論 家 、 文學家 和 音樂家 。 <0x0A> ▁ ▁ ▁ ▁盧 梭 的小說 作品 《 愛 彌 兒 》 ( É m ile ) 是一 篇 關於 全 人 公民 教育的 哲學 論文 , 對 康德 影響 甚 大 。 其 言 情 小說 《 新 愛 洛 伊斯 》 對 前 浪漫 主義 ( pre - rom ant ic ism ) [ 1 9 ] 及 浪漫 主義 時期的 小說 發展 十分 重要 [ 2 0 ] 。 <0x0A> ▁ ▁ ▁ ▁不過 , 一些 知名 學者認為 盧 梭 雖然 預 示 了 浪漫 主義的 誕生 , 但是 其 「 現代 文學 姿態 」 其實 早已 「 超越了 感 傷 的 浪漫 主義 」 , 而其 嶄 新的 語言 觀 甚至 「 一直 延續 到了 超 現實 主義 那裡 」 [ 2 1 ] 。 <0x0A> ▁ ▁ ▁ ▁
Wenzhong GPT2
Although the Wenzhong model was trained on Chinese corpora, it did not build a tokenizer specifically for Chinese. Although the BPE algorithm can be used to back-off bytes (to avoid out-of-vocabulary issues), the encoding length becomes longer, resulting in lower efficiency and loss of semantics after tokenization.
Ċ Ġ Ġ Ġ Ġå ° ļ - éĽ ħ åħ ĭ · çĽ § æ ¢ Ń ï ¼ Ī æ³ ķ èª ŀ ï ¼ ļ Jean - Jac ques ĠRousse au ï ¼ Į æ³ ķ èª ŀ ç Ļ ¼ é Ł ³ ï ¼ ļ [ Ê Ĵ É ij Ì ĥ Ġ Ê Ĵ ak Ġ Ê ģ us o ] ï ¼ Ľ 17 12 å¹ ´ 6 æľ Ī 28 æĹ ¥ âĢĶ 17 78 å¹ ´ 7 æľ Ī 2 æĹ ¥ ï ¼ ī æĺ¯ å ķ Ł è Ĵ Ļ æ ĻĤ 代 çļĦ æ³ ķ åľ ĭ èĪ ĩ æĹ ¥ åħ § ç ĵ ¦ å ĵ ² åŃ ¸ å® ¶ ãĢģ æ Ķ ¿ æ ² » çIJ Ĩ è « ĸ å® ¶ ãĢģ æĸ ĩ åŃ ¸ å® ¶ å Ĵ Į é Ł ³ æ ¨ Ĥ å® ¶ ãĢĤ Ċ Ġ Ġ Ġ Ġç Ľ § æ ¢ Ń çļĦ å° ı èª ª ä½ľ å ĵ ģ ãĢ Ĭ æĦ Ľ å½ Į åħ Ĵ ãĢ ĭ ï ¼ Ī Ãī mile ï ¼ ī æĺ¯ ä¸Ģ ç ¯ ĩ éĹ ľ æĸ ¼ åħ ¨ 人 åħ ¬ æ° ij æķ Ļ è Ĥ ² çļĦ å ĵ ² åŃ ¸ è « ĸ æĸ ĩ ï ¼ Į å° į åº · å¾ · å½ ± é Ł ¿ çĶ ļ 大 ãĢĤ åħ ¶ è ¨ Ģ æĥ ħ å° ı èª ª ãĢ Ĭ æĸ ° æĦ Ľ æ ´ Ľ ä¼ Ĭ æĸ ¯ ãĢ ĭ å° į åī į æµ ª æ ¼ « ä¸ » ç ¾ © ï ¼ Ī pre - rom antic ism ï ¼ ī [ 19 ] åı Ĭ æµ ª æ ¼ « ä¸ » ç ¾ © æ ĻĤ æľ Ł çļĦ å° ı èª ª ç Ļ ¼ å ± ķ åį ģ åĪ Ĩ éĩ į è¦ ģ [ 20 ] ãĢĤ Ċ Ġ Ġ Ġ Ġ ä¸į éģ İ ï ¼ Į ä¸Ģ äº Ľ ç Ł ¥ åIJ į åŃ ¸ èĢħ èª į ç Ĥ º çĽ § æ ¢ Ń éĽ ĸ çĦ ¶ é ł IJ ç ¤ º äº Ĩ æµ ª æ ¼ « ä¸ » ç ¾ © çļĦ èª ķ çĶŁ ï ¼ Į ä½ Ĩ æĺ¯ åħ ¶ ãĢĮ ç ı ¾ 代 æĸ ĩ åŃ ¸ å§ ¿ æ ħĭ ãĢį åħ ¶ å¯ ¦ æĹ © å· ² ãĢĮ è ¶ħ è ¶ Ĭ äº Ĩ æĦ Ł åĤ · çļĦ æµ ª æ ¼ « ä¸ » ç ¾ © ãĢį ï ¼ Į èĢ Į åħ ¶ å ¶ Ħ æĸ ° çļĦ èª ŀ è ¨ Ģ è § Ģ çĶ ļ è ĩ ³ ãĢĮ ä¸Ģ çĽ ´ å » ¶ ç º Į åĪ ° äº Ĩ è ¶ħ ç ı ¾ å¯ ¦ ä¸ » ç ¾ © é Ĥ £ è£ ¡ ãĢį [ 21 ] ãĢĤ Ċ Ġ Ġ Ġ Ġ
LLaMA/LLaMA2
LLaMA only includes a small amount of Chinese, and most Chinese characters are still represented by bytes.
▁ <0x0A> ▁▁▁▁ <0xE5> <0xB0> <0x9A> - 雅 克 · <0xE7> <0x9B> <0xA7> <0xE6> <0xA2> <0xAD> ( 法 語 : Jean - Jac ques ▁R ous seau , 法 語 <0xE7> <0x99> <0xBC> 音 : [ ʒ ɑ ̃ ▁ ʒ ak ▁ ʁ uso ] ; 1 7 1 2 年 6 月 2 8 日 — 1 7 7 8 年 7 月 2 日 ) 是 <0xE5> <0x95> <0x9F> <0xE8> <0x92> <0x99> 時 代 的 法 國 <0xE8> <0x88> <0x87> 日 <0xE5> <0x85> <0xA7> <0xE7> <0x93> <0xA6> <0xE5> <0x93> <0xB2> 學 家 、 政 治 理 論 家 、 文 學 家 和 音 <0xE6> <0xA8> <0x82> 家 。 <0x0A> ▁▁▁▁ <0xE7> <0x9B> <0xA7> <0xE6> <0xA2> <0xAD> 的 小 <0xE8> <0xAA> <0xAA> 作 品 《 愛 <0xE5> <0xBD> <0x8C> <0xE5> <0x85> <0x92> 》 ( É mile ) 是 一 <0xE7> <0xAF> <0x87> <0xE9> <0x97> <0x9C> <0xE6> <0x96> <0xBC> 全 人 公 民 教 育 的 <0xE5> <0x93> <0xB2> 學 論 文 , <0xE5> <0xB0> <0x8D> 康 德 影 <0xE9> <0x9F> <0xBF> <0xE7> <0x94> <0x9A> 大 。 其 言 情 小 <0xE8> <0xAA> <0xAA> 《 新 愛 <0xE6> <0xB4> <0x9B> 伊 斯 》 <0xE5> <0xB0> <0x8D> 前 <0xE6> <0xB5> <0xAA> <0xE6> <0xBC> <0xAB> 主 義 ( pre - rom antic ism ) [ 1 9 ] 及 <0xE6> <0xB5> <0xAA> <0xE6> <0xBC> <0xAB> 主 義 時 期 的 小 <0xE8> <0xAA> <0xAA> <0xE7> <0x99> <0xBC> 展 十 分 重 要 [ 2 0 ] 。 <0x0A> ▁▁▁▁ 不 <0xE9> <0x81> <0x8E> , 一 些 知 名 學 者 <0xE8> <0xAA> <0x8D> <0xE7> <0x82> <0xBA> <0xE7> <0x9B> <0xA7> <0xE6> <0xA2> <0xAD> <0xE9> <0x9B> <0x96> 然 <0xE9> <0xA0> <0x90> 示 了 <0xE6> <0xB5> <0xAA> <0xE6> <0xBC> <0xAB> 主 義 的 <0xE8> <0xAA> <0x95> 生 , <0xE4> <0xBD> <0x86> 是 其 「 現 代 文 學 <0xE5> <0xA7> <0xBF> <0xE6> <0x85> <0x8B> 」 其 <0xE5> <0xAF> <0xA6> <0xE6> <0x97> <0xA9> 已 「 超 越 了 <0xE6> <0x84> <0x9F> <0xE5> <0x82> <0xB7> 的 <0xE6> <0xB5> <0xAA> <0xE6> <0xBC> <0xAB> 主 義 」 , 而 其 <0xE5> <0xB6> <0x84> 新 的 語 言 <0xE8> <0xA7> <0x80> <0xE7> <0x94> <0x9A> <0xE8> <0x87> <0xB3> 「 一 直 <0xE5> <0xBB> <0xB6> <0xE7> <0xBA> <0x8C> 到 了 超 現 <0xE5> <0xAF> <0xA6> 主 義 那 <0xE8> <0xA3> <0xA1> 」 [ 2 1 ] 。 <0x0A> ▁▁▁▁
🔧 Technical Details
No technical details are provided in the original document, so this section is skipped.
📄 License
No license information is provided in the original document, so this section is skipped.