Tonic commited on
Commit
01181da
Β·
verified Β·
1 Parent(s): 1c2dce3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,8 +22,8 @@ DESCRIPTION = """
22
  """
23
 
24
  # tokenizer = AutoTokenizer.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
25
- tokenizer = LlamaTokenizerFast.from_pretrained(tokenizer_id, device_map="cuda", quantization_config = quantization_config, trust_remote_code=True)
26
- model = AutoModelForCausalLM.from_pretrained(model_id, load_in_4bit=True, device_map="cuda", trust_remote_code=True)
27
 
28
  def format_prompt(user_message, system_message="You are Grok-1, an AI language model created by Tonic-AI. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and follow ethical guidelines and promote positive behavior.\n\n"):
29
  # prompt = f"<|im_start|>assistant\n{system_message}<|im_end|>\n<|im_start|>\nuser\n{user_message}<|im_end|>\nassistant\n"
 
22
  """
23
 
24
  # tokenizer = AutoTokenizer.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
25
+ tokenizer = LlamaTokenizerFast.from_pretrained(tokenizer_id, device_map="cuda", trust_remote_code=True)
26
+ model = AutoModelForCausalLM.from_pretrained(model_id, load_in_4bit=True, quantization_config = quantization_config, device_map="cuda", trust_remote_code=True)
27
 
28
  def format_prompt(user_message, system_message="You are Grok-1, an AI language model created by Tonic-AI. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and follow ethical guidelines and promote positive behavior.\n\n"):
29
  # prompt = f"<|im_start|>assistant\n{system_message}<|im_end|>\n<|im_start|>\nuser\n{user_message}<|im_end|>\nassistant\n"