gnumanth commited on
Commit
9c429e6
路
verified 路
1 Parent(s): 3eb4153

Release v1.1.0: 512-token sliding window + multi-numeric contract disambiguation

Browse files
Files changed (3) hide show
  1. config.json +1 -0
  2. modeling_nullspan.py +3 -1
  3. onnx/model.onnx +1 -1
config.json CHANGED
@@ -10,6 +10,7 @@
10
  "dropout": 0.1,
11
  "dtype": "float32",
12
  "hidden_size": 768,
 
13
  "model_type": "nullspan",
14
  "null_temperature": 1.0,
15
  "num_bio_labels": 3,
 
10
  "dropout": 0.1,
11
  "dtype": "float32",
12
  "hidden_size": 768,
13
+ "max_length": 512,
14
  "model_type": "nullspan",
15
  "null_temperature": 1.0,
16
  "num_bio_labels": 3,
modeling_nullspan.py CHANGED
@@ -33,6 +33,7 @@ class NullspanConfig(PretrainedConfig):
33
  dropout: float = 0.1,
34
  null_temperature: float = 1.0,
35
  span_temperature: float = 1.0,
 
36
  **kwargs: Any,
37
  ) -> None:
38
  super().__init__(**kwargs)
@@ -43,6 +44,7 @@ class NullspanConfig(PretrainedConfig):
43
  self.dropout = dropout
44
  self.null_temperature = null_temperature
45
  self.span_temperature = span_temperature
 
46
 
47
 
48
  def format_field_query(field_name: str, spec: dict[str, Any]) -> str:
@@ -51,7 +53,7 @@ def format_field_query(field_name: str, spec: dict[str, Any]) -> str:
51
  items = spec.get("items", "")
52
  options = spec.get("options", [])
53
  constraint = spec.get("constraint", "")
54
- instr = spec.get("instructions", "")
55
  parts = [f"field: {field_name}", f"type: {ftype}"]
56
  if unit:
57
  parts.append(f"unit: {unit}")
 
33
  dropout: float = 0.1,
34
  null_temperature: float = 1.0,
35
  span_temperature: float = 1.0,
36
+ max_length: int = 512,
37
  **kwargs: Any,
38
  ) -> None:
39
  super().__init__(**kwargs)
 
44
  self.dropout = dropout
45
  self.null_temperature = null_temperature
46
  self.span_temperature = span_temperature
47
+ self.max_length = max_length
48
 
49
 
50
  def format_field_query(field_name: str, spec: dict[str, Any]) -> str:
 
53
  items = spec.get("items", "")
54
  options = spec.get("options", [])
55
  constraint = spec.get("constraint", "")
56
+ instr = spec.get("instructions") or spec.get("instruction") or ""
57
  parts = [f"field: {field_name}", f"type: {ftype}"]
58
  if unit:
59
  parts.append(f"unit: {unit}")
onnx/model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:681bae4594ae8876b86a23a33c7488378bc79c0e0cd25f53f54c767f97000674
3
  size 268359123
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b55c69bca6eaca11c9ee9a44e7410c061f287c54d2af4db42a13424404a03217
3
  size 268359123