This is a new kind of model optimization. This model is based on Meta's Llama-3 70B Instruct.
A paper on the technique is currently being written.
This research was supported with hardware from the
appliedAI Institute, whose goal is to generate and communicate high-quality knowledge about trustworthy AI.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "dnhkng/RYS-Llama3.1-Large"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13messages = [
14 {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
15 {"role": "user", "content": "Who are you?"},
16]
17
18input_ids = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt"
22).to(model.device)
23
24terminators = [
25 tokenizer.eos_token_id,
26 tokenizer.convert_tokens_to_ids("<|eot_id|>")
27]
28
29outputs = model.generate(
30 input_ids,
31 max_new_tokens=256,
32 eos_token_id=terminators,
33 do_sample=True,
34 temperature=0.6,
35 top_p=0.9,
36)
37response = outputs[0][input_ids.shape[-1]:]
38print(tokenizer.decode(response, skip_special_tokens=True))
I’m on the hunt for new challenges and a chance to dive into some exciting research opportunities. Oh, and did I mention I just snagged a top spot on the Open LLM leaderboard? 🎉
Innovation enthusiast, AI strategist, and interdisciplinary-tech nerd – that's me! With over a decade of experience in research and project management, my professional journey has been largely shaped by my passion for artificial intelligence and its potential to transform various industries. With a solid background in artificial intelligence and machine learning, coupled with a knack for innovation and problem-solving (and a healthy dose of curiosity), I'm excited to bring my skills to a new team.
Originally from Australia, where I earned my degrees in Organic Chemistry and Biochemistry, I moved to Germany in 2004. My academic pursuit continued with a PhD in Chemistry at the Max Planck Institute of Biochemistry. Today, I leverage my robust educational background and diverse industry experience to drive AI innovations in a wide range of applications. Hobbies? Lots: I've also built the world's most powerful espresso machine and am working to bring
GLaDOS to life.
I'm based out of Munich, Germany, but I would be interested in working remotely for a team with more compute than my 2x 4090s 🚀
Detailed results can be found
here