cguna frreiss commited on
Commit
8240ebe
·
verified ·
1 Parent(s): 8a29c77

Add granite 3.3 2b context relevance LoRA (#13)

Browse files

- Add granite 3.3 2b LoRA for context relevance (7962c585d14b281d8596c62d5c328bec921aeb53)


Co-authored-by: Fred Reiss <[email protected]>

context_relevance/lora/granite-3.3-2b-instruct/adapter_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "ibm-granite/granite-3.3-2b-instruct",
5
+ "bias": "none",
6
+ "eva_config": null,
7
+ "exclude_modules": null,
8
+ "fan_in_fan_out": false,
9
+ "inference_mode": true,
10
+ "init_lora_weights": true,
11
+ "layer_replication": null,
12
+ "layers_pattern": null,
13
+ "layers_to_transform": null,
14
+ "loftq_config": {},
15
+ "lora_alpha": 32,
16
+ "lora_bias": false,
17
+ "lora_dropout": 0.1,
18
+ "megatron_config": null,
19
+ "megatron_core": "megatron.core",
20
+ "modules_to_save": null,
21
+ "peft_type": "LORA",
22
+ "r": 32,
23
+ "rank_pattern": {},
24
+ "revision": null,
25
+ "target_modules": [
26
+ "q_proj",
27
+ "v_proj",
28
+ "k_proj"
29
+ ],
30
+ "task_type": "CAUSAL_LM",
31
+ "use_dora": false,
32
+ "use_rslora": false
33
+ }
context_relevance/lora/granite-3.3-2b-instruct/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afa17732fea4ce20b591c2e391c2ddbd0e99638a2194ec5d1e29c7930dff69ec
3
+ size 47218112
context_relevance/lora/granite-3.3-2b-instruct/io.yaml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Model name string, or null to use whatever is provided in the chat completion request
2
+ model: ~
3
+ # JSON schema of the model's output
4
+ response_format: |
5
+ {
6
+ "title": "ContextRelevanceOutput",
7
+ "type": "object",
8
+ "properties": {
9
+ "context_relevance": {
10
+ "type": "string",
11
+ "description": "Context relevancy judgment.",
12
+ "enum": ["relevant", "irrelevant", "partially relevant"]
13
+ }
14
+ },
15
+ "required": ["context_relevance"]
16
+ }
17
+ # Additional turn of instructions to add to the chat
18
+ instruction: |
19
+ DOCUMENT: {document_content}
20
+ # Data transformations to perform during post-processing
21
+ transformations:
22
+ - type: likelihood
23
+ categories_to_values:
24
+ "relevant": 1.0
25
+ "irrelevant": 0.0
26
+ "partially relevant": 0.5
27
+ input_path: ["context_relevance"]
28
+ parameters: ~
29
+ sentence_boundaries: ~