SustcZhangYX
commited on
Commit
·
c046500
1
Parent(s):
bea4269
Add model and configuration files
Browse files- config.json +3 -0
- exp.py +27 -0
- generation_config.json +3 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +3 -0
- special_tokens_map.json +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +3 -0
config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ff04c862d2c03bdac5de09109ea10011df8b90003e8ed3301e510caf84eb429c
|
3 |
+
size 903
|
exp.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import transformers
|
2 |
+
import torch
|
3 |
+
|
4 |
+
# Set the path to your local model
|
5 |
+
model_path = "YOUR_LOCAL_MODEL_PATH"
|
6 |
+
|
7 |
+
pipeline = transformers.pipeline(
|
8 |
+
"text-generation",
|
9 |
+
model=model_path, # Use local model path
|
10 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
11 |
+
device_map="auto",
|
12 |
+
)
|
13 |
+
|
14 |
+
messages = [
|
15 |
+
{"role": "system", "content": "You are an expert assistant in environmental science, EnvGPT."},
|
16 |
+
{"role": "user", "content": "What is the definition of environmental science?"},
|
17 |
+
]
|
18 |
+
|
19 |
+
# Pass top_p and temperature directly in the pipeline call
|
20 |
+
outputs = pipeline(
|
21 |
+
messages,
|
22 |
+
max_new_tokens=512,
|
23 |
+
top_p=0.7, # Add nucleus sampling
|
24 |
+
temperature=0.9, # Add temperature control
|
25 |
+
)
|
26 |
+
|
27 |
+
print(outputs[0]["generated_text"])
|
generation_config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ced5f450d3cfbf4fce75b4817e2359b9b9934c6fcb5bbd089c8d7d5149b24b0f
|
3 |
+
size 184
|
model-00001-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf55e335b3269b8ea581a3165ed8d32120d0d177422dfe165e339769253dcb96
|
3 |
+
size 4976698672
|
model-00002-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e2572fb9325e1cc0485ab80450c4c9f16ef8f3685d2de3d08debdc1be2fbf95
|
3 |
+
size 4999802720
|
model-00003-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c9f88aa6f9ad88a2b08396fa839ba3e4153758fc582cad7134c98ae3d4cc220
|
3 |
+
size 4915916176
|
model-00004-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2347ec7be276f63b5c8f7b87f117526e77e0c0b987aa2db6ba3a80ebfa052539
|
3 |
+
size 1168138808
|
model.safetensors.index.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:146776fce3f6db1103aa6f249e65ee5544c5923ce6f971b092eee79aa6e5d37b
|
3 |
+
size 23950
|
special_tokens_map.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1b1835caa5b4d70acaa210fa222b0036f1882f9525c4660fd4810fb3e1e40ff8
|
3 |
+
size 325
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
|
3 |
+
size 17209920
|
tokenizer_config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:084f7b67893406971d92aba32a24f3909addaa9dee1f643d78f580fe37f2e40f
|
3 |
+
size 55439
|