Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
| 11 |
|
| 12 |
DESCRIPTION = '''
|
| 13 |
<div>
|
| 14 |
-
<h1 style="text-align: center;">
|
| 15 |
<p>This Space demonstrates the instruction-tuned model <a href="https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct"><b>Meta Llama3 8b Chat</b></a>. Meta Llama3 is the new open LLM and comes in two sizes: 8b and 70b. Feel free to play with it, or duplicate to run privately!</p>
|
| 16 |
<p>🔎 For more details about the Llama3 release and how to use the model with <code>transformers</code>, take a look <a href="https://huggingface.co/blog/llama3">at our blog post</a>.</p>
|
| 17 |
<p>🦕 Looking for an even more powerful model? Check out the <a href="https://huggingface.co/chat/"><b>Hugging Chat</b></a> integration for Meta Llama 3 70b</p>
|
|
@@ -49,8 +49,8 @@ h1 {
|
|
| 49 |
"""
|
| 50 |
|
| 51 |
# Load the tokenizer and model
|
| 52 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 53 |
-
model = AutoModelForCausalLM.from_pretrained("
|
| 54 |
terminators = [
|
| 55 |
tokenizer.eos_token_id,
|
| 56 |
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
|
|
|
| 11 |
|
| 12 |
DESCRIPTION = '''
|
| 13 |
<div>
|
| 14 |
+
<h1 style="text-align: center;">BotBot Cabra Llama3 8B</h1>
|
| 15 |
<p>This Space demonstrates the instruction-tuned model <a href="https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct"><b>Meta Llama3 8b Chat</b></a>. Meta Llama3 is the new open LLM and comes in two sizes: 8b and 70b. Feel free to play with it, or duplicate to run privately!</p>
|
| 16 |
<p>🔎 For more details about the Llama3 release and how to use the model with <code>transformers</code>, take a look <a href="https://huggingface.co/blog/llama3">at our blog post</a>.</p>
|
| 17 |
<p>🦕 Looking for an even more powerful model? Check out the <a href="https://huggingface.co/chat/"><b>Hugging Chat</b></a> integration for Meta Llama 3 70b</p>
|
|
|
|
| 49 |
"""
|
| 50 |
|
| 51 |
# Load the tokenizer and model
|
| 52 |
+
tokenizer = AutoTokenizer.from_pretrained("botbot-ai/CabraLlama3-8b")
|
| 53 |
+
model = AutoModelForCausalLM.from_pretrained("botbot-ai/CabraLlama3-8b", device_map="auto") # to("cuda:0")
|
| 54 |
terminators = [
|
| 55 |
tokenizer.eos_token_id,
|
| 56 |
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|