Norod78 commited on
Commit
75a15fb
1 Parent(s): 68c2400

Switched model to OpenELM-3B-Instruct

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +6 -6
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Apple OpenELM-3B
3
  emoji: 🍎
4
  colorFrom: green
5
  colorTo: red
@@ -15,7 +15,7 @@ suggested_hardware: t4-small
15
 
16
  OpenELM was introduced in [this paper](https://arxiv.org/abs/2404.14619v1).
17
 
18
- This Space demonstrates [OpenELM-3B](apple/OpenELM-3B) from Apple. Please, check the original model card for details.
19
  You can see the other models of the OpenELM family [here](https://huggingface.co/apple/OpenELM)
20
 
21
  # The following Information was taken "as is" from original model card
 
1
  ---
2
+ title: Apple OpenELM-3B-Instruct
3
  emoji: 🍎
4
  colorFrom: green
5
  colorTo: red
 
15
 
16
  OpenELM was introduced in [this paper](https://arxiv.org/abs/2404.14619v1).
17
 
18
+ This Space demonstrates [OpenELM-3B-Instruct](https://huggingface.co/apple/OpenELM-3B-Instruct) from Apple. Please, check the original model card for details.
19
  You can see the other models of the OpenELM family [here](https://huggingface.co/apple/OpenELM)
20
 
21
  # The following Information was taken "as is" from original model card
app.py CHANGED
@@ -12,12 +12,12 @@ DEFAULT_MAX_NEW_TOKENS = 256
12
  MAX_INPUT_TOKEN_LENGTH = 512
13
 
14
  DESCRIPTION = """\
15
- # OpenELM-3B
16
 
17
- This Space demonstrates [OpenELM-3B](https://huggingface.co/apple/OpenELM-3B) by Apple. Please, check the original model card for details.
18
  You can see the other models of the OpenELM family [here](https://huggingface.co/apple/OpenELM)
19
  The following Colab notebooks are available:
20
- * [OpenELM-3B (GPU)](https://gist.github.com/Norod/4f11bb36bea5c548d18f10f9d7ec09b0)
21
  * [OpenELM-270M (CPU)](https://gist.github.com/Norod/5a311a8e0a774b5c35919913545b7af4)
22
 
23
  You might also be interested in checking out Apple's [CoreNet Github page](https://github.com/apple/corenet?tab=readme-ov-file).
@@ -33,8 +33,8 @@ LICENSE = """
33
  <p/>
34
 
35
  ---
36
- As a derivative work of [OpenELM-3B](https://huggingface.co/apple/OpenELM-3B) by Apple,
37
- this demo is governed by the original [license](https://huggingface.co/apple/OpenELM-3B/blob/main/LICENSE).
38
  """
39
 
40
  if not torch.cuda.is_available():
@@ -42,7 +42,7 @@ if not torch.cuda.is_available():
42
 
43
 
44
  if torch.cuda.is_available():
45
- model_id = "apple/OpenELM-3B"
46
  model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True, low_cpu_mem_usage=True)
47
  tokenizer_id = "meta-llama/Llama-2-7b-hf"
48
  tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
 
12
  MAX_INPUT_TOKEN_LENGTH = 512
13
 
14
  DESCRIPTION = """\
15
+ # OpenELM-3B-Instruct
16
 
17
+ This Space demonstrates [OpenELM-3B-Instruct](https://huggingface.co/apple/OpenELM-3B-Instruct) by Apple. Please, check the original model card for details.
18
  You can see the other models of the OpenELM family [here](https://huggingface.co/apple/OpenELM)
19
  The following Colab notebooks are available:
20
+ * [OpenELM-3B-Instruct (GPU)](https://gist.github.com/Norod/4f11bb36bea5c548d18f10f9d7ec09b0)
21
  * [OpenELM-270M (CPU)](https://gist.github.com/Norod/5a311a8e0a774b5c35919913545b7af4)
22
 
23
  You might also be interested in checking out Apple's [CoreNet Github page](https://github.com/apple/corenet?tab=readme-ov-file).
 
33
  <p/>
34
 
35
  ---
36
+ As a derivative work of [OpenELM-3B-Instruct](https://huggingface.co/apple/OpenELM-3B-Instruct) by Apple,
37
+ this demo is governed by the original [license](https://huggingface.co/apple/OpenELM-3B-Instruct/blob/main/LICENSE).
38
  """
39
 
40
  if not torch.cuda.is_available():
 
42
 
43
 
44
  if torch.cuda.is_available():
45
+ model_id = "apple/OpenELM-3B-Instruct"
46
  model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True, low_cpu_mem_usage=True)
47
  tokenizer_id = "meta-llama/Llama-2-7b-hf"
48
  tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)