Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Taiwan-LLM-7B-v2.1-chat.Q2_K.gguf | Q2_K | 2.36GB |
| Taiwan-LLM-7B-v2.1-chat.IQ3_XS.gguf | IQ3_XS | 2.6GB |
| Taiwan-LLM-7B-v2.1-chat.IQ3_S.gguf | IQ3_S | 2.75GB |
| Taiwan-LLM-7B-v2.1-chat.Q3_K_S.gguf | Q3_K_S | 2.75GB |
| Taiwan-LLM-7B-v2.1-chat.IQ3_M.gguf | IQ3_M | 2.9GB |
| Taiwan-LLM-7B-v2.1-chat.Q3_K.gguf | Q3_K | 3.07GB |
| Taiwan-LLM-7B-v2.1-chat.Q3_K_M.gguf | Q3_K_M | 3.07GB |
| Taiwan-LLM-7B-v2.1-chat.Q3_K_L.gguf | Q3_K_L | 3.35GB |
| Taiwan-LLM-7B-v2.1-chat.IQ4_XS.gguf | IQ4_XS | 3.4GB |
| Taiwan-LLM-7B-v2.1-chat.Q4_0.gguf | Q4_0 | 3.56GB |
| Taiwan-LLM-7B-v2.1-chat.IQ4_NL.gguf | IQ4_NL | 3.58GB |
| Taiwan-LLM-7B-v2.1-chat.Q4_K_S.gguf | Q4_K_S | 3.59GB |
| Taiwan-LLM-7B-v2.1-chat.Q4_K.gguf | Q4_K | 3.8GB |
| Taiwan-LLM-7B-v2.1-chat.Q4_K_M.gguf | Q4_K_M | 3.8GB |
| Taiwan-LLM-7B-v2.1-chat.Q4_1.gguf | Q4_1 | 3.95GB |
| Taiwan-LLM-7B-v2.1-chat.Q5_0.gguf | Q5_0 | 4.33GB |
| Taiwan-LLM-7B-v2.1-chat.Q5_K_S.gguf | Q5_K_S | 4.33GB |
| Taiwan-LLM-7B-v2.1-chat.Q5_K.gguf | Q5_K | 4.45GB |
| Taiwan-LLM-7B-v2.1-chat.Q5_K_M.gguf | Q5_K_M | 4.45GB |
| Taiwan-LLM-7B-v2.1-chat.Q5_1.gguf | Q5_1 | 4.72GB |
| Taiwan-LLM-7B-v2.1-chat.Q6_K.gguf | Q6_K | 5.15GB |


pipeline() function from 🤗 Transformers:1# pip install transformers>=4.34
2# pip install accelerate
3
4import torch
5from transformers import pipeline
6
7pipe = pipeline("text-generation", model="yentinglin/Taiwan-LLM-7B-v2.1-chat", torch_dtype=torch.bfloat16, device_map="auto")
8
9# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
10messages = [
11 {
12 "role": "system",
13 "content": "你是一個人工智慧助理",
14 },
15 {"role": "user", "content": "東北季風如何影響台灣氣候?"},
16]
17prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
18outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
19print(outputs[0]["generated_text"])


@misc{lin2023taiwan,
title={Taiwan LLM: Bridging the Linguistic Divide with a Culturally Aligned Language Model},
author={Yen-Ting Lin and Yun-Nung Chen},
year={2023},
eprint={2311.17487},
archivePrefix={arXiv},
primaryClass={cs.CL}
}