Update README.md
Browse files
README.md
CHANGED
@@ -61,25 +61,27 @@ from bulk_chain.api import iter_content
|
|
61 |
from bulk_chain.core.utils import dynamic_init
|
62 |
|
63 |
content_it = iter_content(
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
83 |
|
84 |
for record in content_it:
|
85 |
# here is the result dictionary that includes summary.
|
|
|
61 |
from bulk_chain.core.utils import dynamic_init
|
62 |
|
63 |
content_it = iter_content(
|
64 |
+
schema={"schema": [
|
65 |
+
{"prompt": "Summarize: {input}", "out": "summary"}]
|
66 |
+
},
|
67 |
+
llm=dynamic_init(
|
68 |
+
class_filepath="providers/huggingface_qwen.py",
|
69 |
+
class_name="Qwen2")(
|
70 |
+
api_token="YOUR_HF_API_KEY_GOES_HERE",
|
71 |
+
model_name="nicolay-r/qwen25-05b-multiclinsum-standard",
|
72 |
+
temp=0.1,
|
73 |
+
use_bf16=True,
|
74 |
+
max_new_tokens=args.max_tokens,
|
75 |
+
device=args.device
|
76 |
+
),
|
77 |
+
infer_mode="batch",
|
78 |
+
batch_size=4,
|
79 |
+
return_mode="record",
|
80 |
+
# INPUT TEXTS:
|
81 |
+
input_dicts_it=[
|
82 |
+
{"input": "A patient 62 years old with ..."}
|
83 |
+
],
|
84 |
+
)
|
85 |
|
86 |
for record in content_it:
|
87 |
# here is the result dictionary that includes summary.
|