Views
No views yet
gpt-3.5-turbo since we are still on the waitlist for gpt-4) and observe some discrepancies between the two types of annoators. All training and evaluation codes are shared under the Apache-2.0 license in our Github, as well as datasets and model weights on HuggingFace. In a similar manner to Dolly v2, we use only use open-source, commercially permissive pretrained models and datasets, our models are neither restricted by non-commercial clause like models that use LLaMA as base nor non-compete clause like models that use self-instruct datasets from ChatGPT. See our live demo here.en, th, ja, vi capacibilities evaluated, theoretically all 30 languages of XGLM-7.5Bmodel_name = "pythainlp/wangchanglm-7.5B-sft-en"
model = AutoModelForCausalLM.from_pretrained(
model_name,
return_dict=True,
load_in_8bit=True ,
device_map="auto",
torch_dtype=torch.float16,
offload_folder="./",
low_cpu_mem_usage=True,
)
text = "เล่นหุ้นยังไงให้รวย"
tokenizer = AutoTokenizer.from_pretrained(model_name)
batch = tokenizer(text, return_tensors="pt")
with torch.cuda.amp.autocast():
output_tokens = model.generate(
input_ids=batch["input_ids"],
max_new_tokens=max_gen_len, # 512
begin_suppress_tokens = exclude_ids,
no_repeat_ngram_size=2,
#oasst k50
top_k=50,
top_p=top_p, # 0.95
typical_p=1.,
temperature=temperature, # 0.9
# #oasst typical3
# typical_p = 0.3,
# temperature = 0.8,
# repetition_penalty = 1.2,
)
tokenizer.decode(output_tokens[0], skip_special_tokens=True)@software{charin_polpanumas_2023_7878101,
author = {Charin Polpanumas and
Wannaphong Phatthiyaphaibun and
Patomporn Payoungkhamdee and
Peerat Limkonchotiwat and
Lalita Lowphansirikul and
Can Udomcharoenchaikit and
Titipat Achakulwisut and
Ekapol Chuangsuwanich and
Sarana Nutanong},
title = {{WangChanGLM🐘 — The Multilingual Instruction-
Following Model}},
month = apr,
year = 2023,
publisher = {Zenodo},
version = {v0.1},
doi = {10.5281/zenodo.7878101},
url = {https://doi.org/10.5281/zenodo.7878101}
}