Views
No views yet
quantumaikr/llama-2-70b-fb16-orca-chat-10k is a Llama2 70B model finetuned on an guanaco, oraca-chat-10k Datasetquantumaikr/llama-2-70b-fb16-orca-chat-10k using the following code snippet:1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
3
4tokenizer = AutoTokenizer.from_pretrained("quantumaikr/llama-2-70b-fb16-orca-chat-10k")
5model = AutoModelForCausalLM.from_pretrained("quantumaikr/llama-2-70b-fb16-orca-chat-10k", torch_dtype=torch.float16, device_map="auto")
6
7system_prompt = "### System:\nYou are QuantumLM, an AI that follows instructions extremely well. Help as much as you can. Remember, be safe, and don't do anything illegal.\n\n"
8
9message = "Write me a poem please"
10prompt = f"{system_prompt}### User: {message}\n\n### Assistant:\n"
11inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
12output = model.generate(**inputs, do_sample=True, temperature=0.9, top_p=0.75, max_new_tokens=4096)
13
14print(tokenizer.decode(output[0], skip_special_tokens=True))### System:
This is a system prompt, please behave and help the user.
### User:
Your prompt here
### Assistant
The output of QuantumLM