AI Notes Pattara Kiatisevi Uncategorized 2023-10-302023-10-30 1 Minute Finetune Falcon 7b/40b instruct with your own data – คือ เอา Falcon มาลอง fine tune โดยเพิ่มข้อมูล prompt+response แบบที่เราต้องการเข้าไปเอง แล้วก็ train เพื่อให้โมเดลตอบแบบที่ train เพิ่มไปได้ YouTube https://www.youtube.com/watch?v=Q9zv369Ggfk Google colab มีต้องแก้ตรงนี้นิดหน่อย %%time device = "cuda:0" encoding = tokenizer(prompt, return_tensors="pt").to(device) # Ott 20231029 #with torch.inference_mode(): with torch.no_grad(): outputs = model.generate( input_ids = encoding.input_ids, attention_mask = encoding.attention_mask, generation_config = generation_config ) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) Langchain Tutorial หลากหลายตัวอย่างการใช้ Langchan / OpenAI API GitHub https://github.com/gkamradt/langchain-tutorials.git Share this: Share on X (Opens in new window) X Share on Facebook (Opens in new window) Facebook Like Loading... Related Published by Pattara Kiatisevi View all posts by Pattara Kiatisevi Published 2023-10-302023-10-30