Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,8 +17,8 @@ DESCRIPTION = """
|
|
| 17 |
# Welcome to Tonic's Grok-1
|
| 18 |
"""
|
| 19 |
|
| 20 |
-
|
| 21 |
-
tokenizer = LlamaTokenizerFast.from_pretrained(tokenizer_id, device_map="cuda", trust_remote_code=True)
|
| 22 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda", trust_remote_code=True)
|
| 23 |
|
| 24 |
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"):
|
|
|
|
| 17 |
# Welcome to Tonic's Grok-1
|
| 18 |
"""
|
| 19 |
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
|
| 21 |
+
# tokenizer = LlamaTokenizerFast.from_pretrained(tokenizer_id, device_map="cuda", trust_remote_code=True)
|
| 22 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda", trust_remote_code=True)
|
| 23 |
|
| 24 |
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"):
|