vikhyatk commited on
Commit
e04241e
1 Parent(s): e041484

Upload Moondream

Browse files
Files changed (3) hide show
  1. config.json +1 -1
  2. model.safetensors +2 -2
  3. moondream.py +1 -2
config.json CHANGED
@@ -10,6 +10,6 @@
10
  "phi_config": {
11
  "model_type": "phi-msft"
12
  },
13
- "torch_dtype": "bfloat16",
14
  "transformers_version": "4.36.2"
15
  }
 
10
  "phi_config": {
11
  "model_type": "phi-msft"
12
  },
13
+ "torch_dtype": "float16",
14
  "transformers_version": "4.36.2"
15
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:804fb766532da200d4a78fab56f6504c10c350d4e46c388d8a4d115b82601fb4
3
- size 3715038432
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:209cc826fb58dbb1f5e375f54b4e277e00c01e07fa40ce1e77c66ddad9f221ee
3
+ size 3715037856
moondream.py CHANGED
@@ -1,5 +1,4 @@
1
  import torch
2
- from torch import nn
3
  from .vision_encoder import VisionEncoder
4
  from .configuration_moondream import MoondreamConfig
5
  from transformers import PreTrainedModel
@@ -98,7 +97,7 @@ class Moondream(PreTrainedModel):
98
  max_new_tokens=256,
99
  **kwargs,
100
  )[0]
101
- cleaned_answer = re.sub("<$", "", re.sub("END$", "", answer)).strip()
102
 
103
  # Use the result_queue to pass the result if it is provided
104
  if result_queue:
 
1
  import torch
 
2
  from .vision_encoder import VisionEncoder
3
  from .configuration_moondream import MoondreamConfig
4
  from transformers import PreTrainedModel
 
97
  max_new_tokens=256,
98
  **kwargs,
99
  )[0]
100
+ cleaned_answer = re.sub("<$|<END$", "", answer).strip()
101
 
102
  # Use the result_queue to pass the result if it is provided
103
  if result_queue: