nicolay-r commited on
Commit
6048812
·
verified ·
1 Parent(s): 4b3bdeb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -31
README.md CHANGED
@@ -1,6 +1,22 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  # Model Card for Model ID
@@ -8,7 +24,6 @@ tags: []
8
  <!-- Provide a quick summary of what the model is/does. -->
9
 
10
 
11
-
12
  ## Model Details
13
 
14
  ### Model Description
@@ -35,19 +50,42 @@ This is the model card of a 🤗 transformers model that has been pushed on the
35
 
36
  ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
  ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
- [More Information Needed]
51
 
52
  ### Out-of-Scope Use
53
 
@@ -102,7 +140,8 @@ Use the code below to get started with the model.
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
 
106
 
107
  ### Testing Data, Factors & Metrics
108
 
@@ -132,24 +171,6 @@ Use the code below to get started with the model.
132
 
133
 
134
 
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
  ## Technical Specifications [optional]
154
 
155
  ### Model Architecture and Objective
 
1
  ---
2
  library_name: transformers
3
+ tags:
4
+ - text-summarization
5
+ - text-generation
6
+ - clinical-report-summarization
7
+ - document-summarization
8
+ license: mit
9
+ language:
10
+ - en
11
+ - fr
12
+ - pt
13
+ - es
14
+ metrics:
15
+ - bertscore
16
+ - rouge
17
+ base_model:
18
+ - Qwen/Qwen2.5-0.5B-Instruct
19
+ pipeline_tag: text-generation
20
  ---
21
 
22
  # Model Card for Model ID
 
24
  <!-- Provide a quick summary of what the model is/does. -->
25
 
26
 
 
27
  ## Model Details
28
 
29
  ### Model Description
 
50
 
51
  ## Uses
52
 
 
 
53
  ### Direct Use
54
 
55
+ We use [bulk-chain](https://github.com/nicolay-r/bulk-chain) for inference with the Qwen2 provider based on `transformers` **pipelines API**.
56
+
57
+ **Provider**: https://github.com/nicolay-r/nlp-thirdgate/blob/9e46629792e9a53871710884f7b9e2fe42666aa7/llm/transformers_qwen2.py
58
+
59
+ ```python
60
+ from bulk_chain.api import iter_content
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(class_filepath="providers/huggingface_qwen.py", class_name="Qwen2")(
68
+ api_token="YOUR_HF_API_KEY_GOES_HERE",
69
+ model_name="nicolay-r/qwen25-05b-multiclinsum-standard",
70
+ temp=0.1,
71
+ use_bf16=True,
72
+ max_new_tokens=args.max_tokens,
73
+ device=args.device
74
+ ),
75
+ infer_mode="batch",
76
+ batch_size=4,
77
+ return_mode="record",
78
+ // INPUT TEXTS:
79
+ input_dicts_it=[
80
+ {"input": "A patient 62 years old with ..."}
81
+ ],
82
+ )
83
+
84
+ for record in content_it:
85
+ # here is the result dictionary that includes summary.
86
+ print(record["summary"])
87
+ ```
88
 
 
89
 
90
  ### Out-of-Scope Use
91
 
 
140
 
141
  ## Evaluation
142
 
143
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64e62d11d27a8292c3637f86/u2cKHWqolMT8LJvI6l5mT.png)
144
+
145
 
146
  ### Testing Data, Factors & Metrics
147
 
 
171
 
172
 
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  ## Technical Specifications [optional]
175
 
176
  ### Model Architecture and Objective