Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -11,10 +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>
|
18 |
</div>
|
19 |
'''
|
20 |
|
@@ -22,7 +19,6 @@ LICENSE = """
|
|
22 |
<p/>
|
23 |
|
24 |
---
|
25 |
-
Built with Meta Llama 3
|
26 |
"""
|
27 |
|
28 |
PLACEHOLDER = """
|
@@ -49,8 +45,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;">deepseek-ai/DeepSeek-R1-Distill-Llama-8B</h1>
|
|
|
|
|
|
|
15 |
</div>
|
16 |
'''
|
17 |
|
|
|
19 |
<p/>
|
20 |
|
21 |
---
|
|
|
22 |
"""
|
23 |
|
24 |
PLACEHOLDER = """
|
|
|
45 |
"""
|
46 |
|
47 |
# Load the tokenizer and model
|
48 |
+
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Llama-8B")
|
49 |
+
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Llama-8B", device_map="auto") # to("cuda:0")
|
50 |
terminators = [
|
51 |
tokenizer.eos_token_id,
|
52 |
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|