Skip to content

Commit 29fe704

Browse files
authored
[New Sample] Add several paddle nlp samples. (#292)
* Add several paddle nlp samples. * Fix bug in validate.
1 parent b91adfc commit 29fe704

File tree

100 files changed

+123425
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+123425
-3
lines changed

graph_net/paddle/validate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _extract_forward_source(model_path, class_name):
4949
def check_graph_hash(args):
5050
model_path = args.model_path
5151
file_path = f"{model_path}/graph_hash.txt"
52-
if args.dump_graph_hash_key:
52+
if not args.no_dump_graph_hash_key:
5353
model_str = _extract_forward_source(model_path, class_name="GraphModule")
5454
assert model_str is not None, f"model_str of {args.model_path} is None."
5555
new_hash_text = _get_sha_hash(model_str)
@@ -128,9 +128,9 @@ def main(args):
128128
help="whether check model graph redundancy",
129129
)
130130
parser.add_argument(
131-
"--dump-graph-hash-key",
131+
"--no-dump-graph-hash-key",
132132
action="store_true",
133-
default=True,
133+
default=False,
134134
help="Dump graph hash key",
135135
)
136136
parser.add_argument(
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4695a657867f0039c4ff42f6aecd6345cf777a6a14311274b8358a577c69c09d
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"framework": "paddle",
3+
"model_name": "blenderbot-1B-distill",
4+
"num_devices_required": 1,
5+
"num_nodes_required": 1
6+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class Program_weight_tensor_data_0:
2+
name = "data_0"
3+
shape = [1, 23]
4+
dtype = "int64"
5+
data = [
6+
6950,
7+
19,
8+
395,
9+
1356,
10+
315,
11+
7140,
12+
21,
13+
281,
14+
632,
15+
3547,
16+
458,
17+
1966,
18+
3244,
19+
5837,
20+
298,
21+
549,
22+
7278,
23+
277,
24+
523,
25+
1499,
26+
21,
27+
228,
28+
2,
29+
]

0 commit comments

Comments
 (0)