Views
No views yet
quantumaikr/quantumairk-llama-2-70B-instruct is a Llama2 70B model(garage-bAInd/Platypus2-70B-instruct) finetuned on some Datasetquantumaikr/quantumairk-llama-2-70B-instruct using the following code snippet:1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
3
4tokenizer = AutoTokenizer.from_pretrained("quantumaikr/quantumairk-llama-2-70B-instruct")
5model = AutoModelForCausalLM.from_pretrained("quantumaikr/quantumairk-llama-2-70B-instruct", torch_dtype=torch.float16, device_map="auto")
6
7system_prompt = "You are QuantumLM, an AI that follows instructions extremely well. Help as much as you can. Remember, be safe, and don't do anything illegal."
8
9message = "Write me a poem please"
10prompt = f"[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n{message}[/INST]"
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=2048)
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