Instructions to use ibm-granite/granitelib-rag-r1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Granite Library
How to use ibm-granite/granitelib-rag-r1.0 with Granite Library:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
remove answer relevance (#19)
Browse files- Remove answer relevance for now (f06aba57223772103a129049abd881f450c36e40)
This view is limited to 50 files because it contains too many changes. See raw diff
- answer_relevance_classifier/README.md +0 -156
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/adapter_config.json +0 -33
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/adapter_model.safetensors +0 -3
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/added_tokens.json +0 -9
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/io.yaml +0 -58
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/merges.txt +0 -0
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/special_tokens_map.json +0 -39
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/tokenizer.json +0 -0
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/tokenizer_config.json +0 -235
- answer_relevance_classifier/granite-3.3-8b-instruct/alora/vocab.json +0 -0
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/adapter_config.json +0 -33
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/adapter_model.safetensors +0 -3
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/added_tokens.json +0 -9
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/io.yaml +0 -58
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/merges.txt +0 -0
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/special_tokens_map.json +0 -39
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/tokenizer.json +0 -0
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/tokenizer_config.json +0 -235
- answer_relevance_classifier/granite-3.3-8b-instruct/lora/vocab.json +0 -0
- answer_relevance_classifier/granite-4.0-micro/lora/adapter_config.json +0 -42
- answer_relevance_classifier/granite-4.0-micro/lora/adapter_model.safetensors +0 -3
- answer_relevance_classifier/granite-4.0-micro/lora/chat_template.jinja +0 -118
- answer_relevance_classifier/granite-4.0-micro/lora/io.yaml +0 -58
- answer_relevance_classifier/granite-4.0-micro/lora/merges.txt +0 -0
- answer_relevance_classifier/granite-4.0-micro/lora/special_tokens_map.json +0 -30
- answer_relevance_classifier/granite-4.0-micro/lora/tokenizer.json +0 -0
- answer_relevance_classifier/granite-4.0-micro/lora/tokenizer_config.json +0 -783
- answer_relevance_classifier/granite-4.0-micro/lora/training_args.bin +0 -3
- answer_relevance_classifier/granite-4.0-micro/lora/vocab.json +0 -0
- answer_relevance_classifier/granite4_micro/lora/Lora-q8_0.gguf +0 -3
- answer_relevance_classifier/granite4_micro/lora/Modelfile +0 -2
- answer_relevance_classifier/granite4_micro/lora/io.yaml +0 -50
- answer_relevance_rewriter/README.md +0 -157
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/adapter_config.json +0 -33
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/adapter_model.safetensors +0 -3
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/added_tokens.json +0 -9
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/io.yaml +0 -29
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/merges.txt +0 -0
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/special_tokens_map.json +0 -39
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/tokenizer.json +0 -0
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/tokenizer_config.json +0 -235
- answer_relevance_rewriter/granite-3.3-8b-instruct/alora/vocab.json +0 -0
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/adapter_config.json +0 -33
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/adapter_model.safetensors +0 -3
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/added_tokens.json +0 -9
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/io.yaml +0 -29
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/merges.txt +0 -0
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/special_tokens_map.json +0 -39
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/tokenizer.json +0 -0
- answer_relevance_rewriter/granite-3.3-8b-instruct/lora/tokenizer_config.json +0 -235
answer_relevance_classifier/README.md
DELETED
|
@@ -1,156 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
pipeline_tag: text-generation
|
| 6 |
-
library_name: peft
|
| 7 |
-
library_name: transformers
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
# Intrinsics for Answer Relevance Classifier
|
| 11 |
-
|
| 12 |
-
## Model Summary
|
| 13 |
-
This is a RAG-specific intrinsic for answer relevance classification task.
|
| 14 |
-
The model takes as input a multi-turn conversation ending with assistant response,
|
| 15 |
-
and provides a classification of whether the assistant's response is relevant to the
|
| 16 |
-
user's final inquiry, as well as categorization of the relevance and reasoning for the conclusions.
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
We provide two intrinsics implemented as LoRA adapters (LoRA/aLoRA) trained over
|
| 20 |
-
Granite-3.3-2b-instruct, Granite-3.3-8b-instruct.
|
| 21 |
-
|
| 22 |
-
- **Developer:** IBM Research
|
| 23 |
-
- **Model type:** LoRA and aLoRA adapter for
|
| 24 |
-
[ibm-granite/granite-3.3-2b-instruct](https://huggingface.co/ibm-granite/granite-3.3-2b-instruct),
|
| 25 |
-
[ibm-granite/granite-3.3-8b-instruct](https://huggingface.co/ibm-granite/granite-3.3-8b-instruct)
|
| 26 |
-
- **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
| 27 |
-
|
| 28 |
-
## Intended use
|
| 29 |
-
This rag specific intrinsics is intended to be used to post-process the generated assistant response.
|
| 30 |
-
|
| 31 |
-
- The binary classification of relevance can be used to determine if the assistance response is suitable
|
| 32 |
-
to be given to the user, or a rewrite to a more relevant response is necessary.
|
| 33 |
-
- The category and the analysis providing reasoning for the conclusion can be used to
|
| 34 |
-
be incorporated into prompt for the answer relevance rewriter, indicating specific directions
|
| 35 |
-
the rewrite must take to overcome the perceived deficiency in relevance.
|
| 36 |
-
|
| 37 |
-
**Model input**: The input to the answer relevance classifier intrinsic is an
|
| 38 |
-
OpenAI-compatible chat completion request, containing a list of conversation
|
| 39 |
-
turns that can alternate between the `user` and `assistant` role and ending with
|
| 40 |
-
a `assistant` turn.
|
| 41 |
-
|
| 42 |
-
**Model output**: The output of the answer relevance classifier intrinsic is the result of the
|
| 43 |
-
original chat completion request formatted as a JSON object of the following schema
|
| 44 |
-
|
| 45 |
-
{
|
| 46 |
-
answer_relevance_analysis: <Free text analysis of whether and in which ways the assistant response is relevant or not>
|
| 47 |
-
answer_relevance_category: <One of a set of labels>
|
| 48 |
-
answer_relevance_likelihood: <float between 0.0 and 1.0>
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
The set of labels for `answer_relevance_category` are:
|
| 52 |
-
"Pertinent",
|
| 53 |
-
"Pertinent with relevant extra",
|
| 54 |
-
"Excessive unnecessary information",
|
| 55 |
-
"Unduly restrictive",
|
| 56 |
-
"Too vague or generic",
|
| 57 |
-
"Contextual misalignment",
|
| 58 |
-
"Misinterpreted inquiry",
|
| 59 |
-
"No attempt"
|
| 60 |
-
|
| 61 |
-
Please see the code snippets in the Quickstart Example section below for
|
| 62 |
-
examples that illustrate the intrinsic's input/output.
|
| 63 |
-
|
| 64 |
-
## Quickstart Example
|
| 65 |
-
|
| 66 |
-
The recommended way to call this intrinsic is through the [Mellea](https://mellea.ai) framework.
|
| 67 |
-
Here is some example code for calling this intrinsic from Mellea:
|
| 68 |
-
```
|
| 69 |
-
from mellea.backends.huggingface import LocalHFBackend
|
| 70 |
-
from mellea.stdlib.base import ChatContext, Document
|
| 71 |
-
from mellea.stdlib.chat import Message
|
| 72 |
-
from mellea.stdlib.intrinsics import rag
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
backend = LocalHFBackend(model_id="ibm-granite/granite-3.3-2b-instruct")
|
| 76 |
-
context = ChatContext().add(Message("user", "Who attended the meeting?"))
|
| 77 |
-
documents = [
|
| 78 |
-
Document("Meeting attendees: Alice, Bob, Carol."),
|
| 79 |
-
Document("Meeting time: 9:00 am to 11:00 am."),
|
| 80 |
-
]
|
| 81 |
-
original_result = "Many people attended the meeting."
|
| 82 |
-
|
| 83 |
-
print(f"Result before relevance intrinsic: {original_result}")
|
| 84 |
-
result = rag.rewrite_answer_for_relevance(original_result, documents, context, backend)
|
| 85 |
-
print(f"Result after relevance intrinsic: {result}")
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
## Training Details
|
| 89 |
-
|
| 90 |
-
### Training Data
|
| 91 |
-
|
| 92 |
-
The training data is created in the following process
|
| 93 |
-
1. Take the synthetic rag-data-granite dataset, consisting of conversations between user and assistant.
|
| 94 |
-
2. Replace the assistant response by running granite-3.2-intrinsics at temperature 1.0.
|
| 95 |
-
3. Produce answer_relevance_classifier target output using mixtral-large with prompts with in-context examples.
|
| 96 |
-
The conversation created in steps 1 and 2 are taken as training input. The json string from step 3
|
| 97 |
-
is taken as train target output.
|
| 98 |
-
|
| 99 |
-
#### Training Hyperparameters
|
| 100 |
-
|
| 101 |
-
The LoRA adapter was fine-tuned using PEFT under the following regime: rank =
|
| 102 |
-
32, learning rate = 3.0e-06, number of epochs = 50.
|
| 103 |
-
|
| 104 |
-
## Evaluation
|
| 105 |
-
|
| 106 |
-
### Answer Relevance Classifier
|
| 107 |
-
|
| 108 |
-
We evaluated the model on test data set generated by the same procedure as the training process,
|
| 109 |
-
using GPT-4o as judge.
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
The following table presents results comparing baselines and frontier models
|
| 113 |
-
on the answer relevance classification task. The LoRAs perform on par with frontier models
|
| 114 |
-
of much larger size and outperforms frontier models of comparable size.
|
| 115 |
-
|
| 116 |
-
| | Not relevant | | | Relevant | | |
|
| 117 |
-
|:------------------------|:----------|:-------|:------|:----------|:-------|:------|
|
| 118 |
-
| | precision | recall | f1 | precision | recall | f1 |
|
| 119 |
-
| mixtral-8x22b-v0.1 | 0.934 | 0.592 | 0.725 | 0.886 | 0.880 | 0.883 |
|
| 120 |
-
| llama-3.3-70b | 0.895 | 0.829 | 0.861 | 0.898 | 0.939 | 0.918 |
|
| 121 |
-
| gpt-oss-20b | 0.747 | 0.745 | 0.746 | 0.969 | 0.782 | 0.865 |
|
| 122 |
-
| gpt-4o | 0.775 | 0.945 | 0.852 | 0.974 | 0.690 | 0.808 |
|
| 123 |
-
| gpt-4o-mini | 0.818 | 0.921 | 0.866 | 0.948 | 0.872 | 0.908 |
|
| 124 |
-
| | | | | | | |
|
| 125 |
-
| granite-3.3-2b/lora | 0.743 | 0.861 | 0.798 | 0.909 | 0.806 | 0.855 |
|
| 126 |
-
| granite-3.3-2b/alora | 0.761 | 0.821 | 0.790 | 0.894 | 0.833 | 0.862 |
|
| 127 |
-
| granite-3.3-8b/lora | 0.783 | 0.900 | 0.837 | 0.931 | 0.842 | 0.884 |
|
| 128 |
-
| granite-3.3-8b/alora | 0.793 | 0.879 | 0.834 | 0.919 | 0.856 | 0.886 |
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
### Comparing the Answer Relevance Classifier Intrinsics vs. Vanilla Granite Models
|
| 132 |
-
|
| 133 |
-
We compare the performance of Granite 3.3-2b, Granite 3.3-8b Instruct
|
| 134 |
-
vs. answer relevance classifier intrinsics implemented as LoRA adapters.
|
| 135 |
-
It is seen that the LoRAs significantly out perform the base models.
|
| 136 |
-
|
| 137 |
-
| | Not relevant | | | Relevant | | |
|
| 138 |
-
|:------------------------|:----------|:-------|:------|:----------|:-------|:------|
|
| 139 |
-
| | precision | recall | f1 | precision | recall | f1 |
|
| 140 |
-
| granite-3.3-2b | | | | | | |
|
| 141 |
-
| granite-3.3-2b/lora | 0.743 | 0.861 | 0.798 | 0.909 | 0.806 | 0.855 |
|
| 142 |
-
| granite-3.3-2b/alora | 0.761 | 0.821 | 0.790 | 0.894 | 0.833 | 0.862 |
|
| 143 |
-
| | | | | | | |
|
| 144 |
-
| granite-3.3-8b | 0.798 | 0.542 | 0.646 | 0.813 | 0.770 | 0.791 |
|
| 145 |
-
| granite-3.3-8b/lora | 0.783 | 0.900 | 0.837 | 0.931 | 0.842 | 0.884 |
|
| 146 |
-
| granite-3.3-8b/alora | 0.793 | 0.879 | 0.834 | 0.919 | 0.856 | 0.886 |
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
## Model Card Authors
|
| 151 |
-
|
| 152 |
-
[Huaiyu Zhu](mailto:huaiyu@us.ibm.com)
|
| 153 |
-
|
| 154 |
-
### Framework versions
|
| 155 |
-
|
| 156 |
-
- PEFT 0.14.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/adapter_config.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alpha_pattern": {},
|
| 3 |
-
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "ibm-granite/granite-3.3-8b-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.05,
|
| 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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/adapter_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7847e2deca119b7dc535f7d260b3000fa4fc6ea3aabc6b7e033de8eb417a054a
|
| 3 |
-
size 94404160
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/added_tokens.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"<|end_of_cite|>": 49156,
|
| 3 |
-
"<|end_of_plugin|>": 49158,
|
| 4 |
-
"<|end_of_role|>": 49153,
|
| 5 |
-
"<|start_of_cite|>": 49155,
|
| 6 |
-
"<|start_of_plugin|>": 49157,
|
| 7 |
-
"<|start_of_role|>": 49152,
|
| 8 |
-
"<|tool_call|>": 49154
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/io.yaml
DELETED
|
@@ -1,58 +0,0 @@
|
|
| 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 |
-
"properties": {
|
| 7 |
-
"answer_relevance_analysis": {
|
| 8 |
-
"title": "Answer Relevance Analysis",
|
| 9 |
-
"type": "string"
|
| 10 |
-
},
|
| 11 |
-
"answer_relevance_category": {
|
| 12 |
-
"title": "Answer Relevance Category",
|
| 13 |
-
"type": "string",
|
| 14 |
-
"enum": [
|
| 15 |
-
"Pertinent",
|
| 16 |
-
"Pertinent with relevant extra",
|
| 17 |
-
"Excessive unnecessary information",
|
| 18 |
-
"Unduly restrictive",
|
| 19 |
-
"Too vague or generic",
|
| 20 |
-
"Contextual misalignment",
|
| 21 |
-
"Misinterpreted inquiry",
|
| 22 |
-
"No attempt"
|
| 23 |
-
]
|
| 24 |
-
},
|
| 25 |
-
"answer_relevance_judgment": {
|
| 26 |
-
"title": "Answer Relevance Judgment",
|
| 27 |
-
"type": "boolean"
|
| 28 |
-
}
|
| 29 |
-
},
|
| 30 |
-
"required": [
|
| 31 |
-
"answer_relevance_analysis",
|
| 32 |
-
"answer_relevance_category",
|
| 33 |
-
"answer_relevance_judgment"
|
| 34 |
-
],
|
| 35 |
-
"title": "AnswerRelevanceRawOutput",
|
| 36 |
-
"type": "object"
|
| 37 |
-
}
|
| 38 |
-
# Additional turn of instructions to add to the chat
|
| 39 |
-
instruction: "answer_relevance"
|
| 40 |
-
# Data transformations to perform during post-processing
|
| 41 |
-
transformations:
|
| 42 |
-
# Convert categorical answer to continuous value by decoding logprobs
|
| 43 |
-
- type: likelihood
|
| 44 |
-
categories_to_values:
|
| 45 |
-
true: 1.0
|
| 46 |
-
false: 0.0
|
| 47 |
-
input_path: ["answer_relevance_judgment"]
|
| 48 |
-
# Rename answer_relevance_judgment column to reflect likelihood transformation
|
| 49 |
-
- type: project
|
| 50 |
-
input_path: []
|
| 51 |
-
retained_fields:
|
| 52 |
-
"answer_relevance_analysis": "answer_relevance_analysis"
|
| 53 |
-
"answer_relevance_category": "answer_relevance_category"
|
| 54 |
-
"answer_relevance_judgment": "answer_relevance_likelihood"
|
| 55 |
-
parameters:
|
| 56 |
-
# Current LoRA can be quite verbose in its explanations.
|
| 57 |
-
max_completion_tokens: 1024
|
| 58 |
-
sentence_boundaries: ~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/merges.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/special_tokens_map.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"<|start_of_role|>",
|
| 4 |
-
"<|end_of_role|>",
|
| 5 |
-
"<|tool_call|>",
|
| 6 |
-
"<|start_of_cite|>",
|
| 7 |
-
"<|end_of_cite|>",
|
| 8 |
-
"<|start_of_plugin|>",
|
| 9 |
-
"<|end_of_plugin|>"
|
| 10 |
-
],
|
| 11 |
-
"bos_token": {
|
| 12 |
-
"content": "<|end_of_text|>",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false
|
| 17 |
-
},
|
| 18 |
-
"eos_token": {
|
| 19 |
-
"content": "<|end_of_text|>",
|
| 20 |
-
"lstrip": false,
|
| 21 |
-
"normalized": false,
|
| 22 |
-
"rstrip": false,
|
| 23 |
-
"single_word": false
|
| 24 |
-
},
|
| 25 |
-
"pad_token": {
|
| 26 |
-
"content": "<|end_of_text|>",
|
| 27 |
-
"lstrip": false,
|
| 28 |
-
"normalized": false,
|
| 29 |
-
"rstrip": false,
|
| 30 |
-
"single_word": false
|
| 31 |
-
},
|
| 32 |
-
"unk_token": {
|
| 33 |
-
"content": "<|end_of_text|>",
|
| 34 |
-
"lstrip": false,
|
| 35 |
-
"normalized": false,
|
| 36 |
-
"rstrip": false,
|
| 37 |
-
"single_word": false
|
| 38 |
-
}
|
| 39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/tokenizer_config.json
DELETED
|
@@ -1,235 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": false,
|
| 3 |
-
"add_prefix_space": false,
|
| 4 |
-
"added_tokens_decoder": {
|
| 5 |
-
"0": {
|
| 6 |
-
"content": "<|end_of_text|>",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": false,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false,
|
| 11 |
-
"special": true
|
| 12 |
-
},
|
| 13 |
-
"1": {
|
| 14 |
-
"content": "<fim_prefix>",
|
| 15 |
-
"lstrip": false,
|
| 16 |
-
"normalized": false,
|
| 17 |
-
"rstrip": false,
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"special": true
|
| 20 |
-
},
|
| 21 |
-
"2": {
|
| 22 |
-
"content": "<fim_middle>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": false,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false,
|
| 27 |
-
"special": true
|
| 28 |
-
},
|
| 29 |
-
"3": {
|
| 30 |
-
"content": "<fim_suffix>",
|
| 31 |
-
"lstrip": false,
|
| 32 |
-
"normalized": false,
|
| 33 |
-
"rstrip": false,
|
| 34 |
-
"single_word": false,
|
| 35 |
-
"special": true
|
| 36 |
-
},
|
| 37 |
-
"4": {
|
| 38 |
-
"content": "<fim_pad>",
|
| 39 |
-
"lstrip": false,
|
| 40 |
-
"normalized": false,
|
| 41 |
-
"rstrip": false,
|
| 42 |
-
"single_word": false,
|
| 43 |
-
"special": true
|
| 44 |
-
},
|
| 45 |
-
"5": {
|
| 46 |
-
"content": "<filename>",
|
| 47 |
-
"lstrip": false,
|
| 48 |
-
"normalized": false,
|
| 49 |
-
"rstrip": false,
|
| 50 |
-
"single_word": false,
|
| 51 |
-
"special": true
|
| 52 |
-
},
|
| 53 |
-
"6": {
|
| 54 |
-
"content": "<gh_stars>",
|
| 55 |
-
"lstrip": false,
|
| 56 |
-
"normalized": false,
|
| 57 |
-
"rstrip": false,
|
| 58 |
-
"single_word": false,
|
| 59 |
-
"special": true
|
| 60 |
-
},
|
| 61 |
-
"7": {
|
| 62 |
-
"content": "<issue_start>",
|
| 63 |
-
"lstrip": false,
|
| 64 |
-
"normalized": false,
|
| 65 |
-
"rstrip": false,
|
| 66 |
-
"single_word": false,
|
| 67 |
-
"special": true
|
| 68 |
-
},
|
| 69 |
-
"8": {
|
| 70 |
-
"content": "<issue_comment>",
|
| 71 |
-
"lstrip": false,
|
| 72 |
-
"normalized": false,
|
| 73 |
-
"rstrip": false,
|
| 74 |
-
"single_word": false,
|
| 75 |
-
"special": true
|
| 76 |
-
},
|
| 77 |
-
"9": {
|
| 78 |
-
"content": "<issue_closed>",
|
| 79 |
-
"lstrip": false,
|
| 80 |
-
"normalized": false,
|
| 81 |
-
"rstrip": false,
|
| 82 |
-
"single_word": false,
|
| 83 |
-
"special": true
|
| 84 |
-
},
|
| 85 |
-
"10": {
|
| 86 |
-
"content": "<jupyter_start>",
|
| 87 |
-
"lstrip": false,
|
| 88 |
-
"normalized": false,
|
| 89 |
-
"rstrip": false,
|
| 90 |
-
"single_word": false,
|
| 91 |
-
"special": true
|
| 92 |
-
},
|
| 93 |
-
"11": {
|
| 94 |
-
"content": "<jupyter_text>",
|
| 95 |
-
"lstrip": false,
|
| 96 |
-
"normalized": false,
|
| 97 |
-
"rstrip": false,
|
| 98 |
-
"single_word": false,
|
| 99 |
-
"special": true
|
| 100 |
-
},
|
| 101 |
-
"12": {
|
| 102 |
-
"content": "<jupyter_code>",
|
| 103 |
-
"lstrip": false,
|
| 104 |
-
"normalized": false,
|
| 105 |
-
"rstrip": false,
|
| 106 |
-
"single_word": false,
|
| 107 |
-
"special": true
|
| 108 |
-
},
|
| 109 |
-
"13": {
|
| 110 |
-
"content": "<jupyter_output>",
|
| 111 |
-
"lstrip": false,
|
| 112 |
-
"normalized": false,
|
| 113 |
-
"rstrip": false,
|
| 114 |
-
"single_word": false,
|
| 115 |
-
"special": true
|
| 116 |
-
},
|
| 117 |
-
"14": {
|
| 118 |
-
"content": "<empty_output>",
|
| 119 |
-
"lstrip": false,
|
| 120 |
-
"normalized": false,
|
| 121 |
-
"rstrip": false,
|
| 122 |
-
"single_word": false,
|
| 123 |
-
"special": true
|
| 124 |
-
},
|
| 125 |
-
"15": {
|
| 126 |
-
"content": "<commit_before>",
|
| 127 |
-
"lstrip": false,
|
| 128 |
-
"normalized": false,
|
| 129 |
-
"rstrip": false,
|
| 130 |
-
"single_word": false,
|
| 131 |
-
"special": true
|
| 132 |
-
},
|
| 133 |
-
"16": {
|
| 134 |
-
"content": "<commit_msg>",
|
| 135 |
-
"lstrip": false,
|
| 136 |
-
"normalized": false,
|
| 137 |
-
"rstrip": false,
|
| 138 |
-
"single_word": false,
|
| 139 |
-
"special": true
|
| 140 |
-
},
|
| 141 |
-
"17": {
|
| 142 |
-
"content": "<commit_after>",
|
| 143 |
-
"lstrip": false,
|
| 144 |
-
"normalized": false,
|
| 145 |
-
"rstrip": false,
|
| 146 |
-
"single_word": false,
|
| 147 |
-
"special": true
|
| 148 |
-
},
|
| 149 |
-
"18": {
|
| 150 |
-
"content": "<reponame>",
|
| 151 |
-
"lstrip": false,
|
| 152 |
-
"normalized": false,
|
| 153 |
-
"rstrip": false,
|
| 154 |
-
"single_word": false,
|
| 155 |
-
"special": true
|
| 156 |
-
},
|
| 157 |
-
"49152": {
|
| 158 |
-
"content": "<|start_of_role|>",
|
| 159 |
-
"lstrip": false,
|
| 160 |
-
"normalized": false,
|
| 161 |
-
"rstrip": false,
|
| 162 |
-
"single_word": false,
|
| 163 |
-
"special": true
|
| 164 |
-
},
|
| 165 |
-
"49153": {
|
| 166 |
-
"content": "<|end_of_role|>",
|
| 167 |
-
"lstrip": false,
|
| 168 |
-
"normalized": false,
|
| 169 |
-
"rstrip": false,
|
| 170 |
-
"single_word": false,
|
| 171 |
-
"special": true
|
| 172 |
-
},
|
| 173 |
-
"49154": {
|
| 174 |
-
"content": "<|tool_call|>",
|
| 175 |
-
"lstrip": false,
|
| 176 |
-
"normalized": false,
|
| 177 |
-
"rstrip": false,
|
| 178 |
-
"single_word": false,
|
| 179 |
-
"special": true
|
| 180 |
-
},
|
| 181 |
-
"49155": {
|
| 182 |
-
"content": "<|start_of_cite|>",
|
| 183 |
-
"lstrip": false,
|
| 184 |
-
"normalized": false,
|
| 185 |
-
"rstrip": false,
|
| 186 |
-
"single_word": false,
|
| 187 |
-
"special": true
|
| 188 |
-
},
|
| 189 |
-
"49156": {
|
| 190 |
-
"content": "<|end_of_cite|>",
|
| 191 |
-
"lstrip": false,
|
| 192 |
-
"normalized": false,
|
| 193 |
-
"rstrip": false,
|
| 194 |
-
"single_word": false,
|
| 195 |
-
"special": true
|
| 196 |
-
},
|
| 197 |
-
"49157": {
|
| 198 |
-
"content": "<|start_of_plugin|>",
|
| 199 |
-
"lstrip": false,
|
| 200 |
-
"normalized": false,
|
| 201 |
-
"rstrip": false,
|
| 202 |
-
"single_word": false,
|
| 203 |
-
"special": true
|
| 204 |
-
},
|
| 205 |
-
"49158": {
|
| 206 |
-
"content": "<|end_of_plugin|>",
|
| 207 |
-
"lstrip": false,
|
| 208 |
-
"normalized": false,
|
| 209 |
-
"rstrip": false,
|
| 210 |
-
"single_word": false,
|
| 211 |
-
"special": true
|
| 212 |
-
}
|
| 213 |
-
},
|
| 214 |
-
"additional_special_tokens": [
|
| 215 |
-
"<|start_of_role|>",
|
| 216 |
-
"<|end_of_role|>",
|
| 217 |
-
"<|tool_call|>",
|
| 218 |
-
"<|start_of_cite|>",
|
| 219 |
-
"<|end_of_cite|>",
|
| 220 |
-
"<|start_of_plugin|>",
|
| 221 |
-
"<|end_of_plugin|>"
|
| 222 |
-
],
|
| 223 |
-
"bos_token": "<|end_of_text|>",
|
| 224 |
-
"chat_template": "{# Alias tools -> available_tools #}\n{%- if tools and not available_tools -%}\n {%- set available_tools = tools -%}\n{%- endif -%}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n {%- else %}\n {%- set system_message = \"Knowledge Cutoff Date: April 2024.\nToday's Date: \" + strftime_now('%B %d, %Y') + \".\nYou are Granite, developed by IBM.\" %}\n {%- if available_tools and documents %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\nWrite the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif available_tools %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\" %}\n {%- elif documents %}\n {%- set system_message = system_message + \" Write the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif thinking %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\nRespond to every user query in a comprehensive and detailed way. You can write down your thoughts and reasoning process before responding. In the thought process, engage in a comprehensive cycle of analysis, summarization, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. In the response section, based on various attempts, explorations, and reflections from the thoughts section, systematically present the final solution that you deem correct. The response should summarize the thought process. Write your thoughts between <think></think> and write your response between <response></response> for each user query.\" %}\n {%- else %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\" %}\n {%- endif %}\n {%- if 'citations' in controls and documents %}\n {%- set system_message = system_message + '\nUse the symbols <|start_of_cite|> and <|end_of_cite|> to indicate when a fact comes from a document in the search result, e.g <|start_of_cite|> {document_id: 1}my fact <|end_of_cite|> for a fact from document 1. Afterwards, list all the citations with their corresponding documents in an ordered list.' %}\n {%- endif %}\n {%- if 'hallucinations' in controls and documents %}\n {%- set system_message = system_message + '\nFinally, after the response is written, include a numbered list of sentences from the response with a corresponding risk value that are hallucinated and not based in the documents.' %}\n {%- endif %}\n {%- set loop_messages = messages %}\n {%- endif %}\n {{- '<|start_of_role|>system<|end_of_role|>' + system_message + '<|end_of_text|>\n' }}\n {%- if available_tools %}\n {{- '<|start_of_role|>available_tools<|end_of_role|>' }}\n {{- available_tools | tojson(indent=4) }}\n {{- '<|end_of_text|>\n' }}\n {%- endif %}\n {%- if documents %}\n {%- for document in documents %}\n {{- '<|start_of_role|>document {\"document_id\": \"' + document['doc_id'] | string + '\"}<|end_of_role|>\n' }}\n {{- document['text'] }}\n {{- '<|end_of_text|>\n' }}\n {%- endfor %}\n {%- endif %}\n {%- for message in loop_messages %}\n {{- '<|start_of_role|>' + message['role'] + '<|end_of_role|>' + message['content'] + '<|end_of_text|>\n' }}\n {%- if loop.last and add_generation_prompt %}\n {{- '<|start_of_role|>assistant' }}\n {%- if controls %}\n {{- ' ' + controls | tojson()}}\n {%- endif %}\n {{- '<|end_of_role|>' }}\n {%- endif %}\n {%- endfor %}",
|
| 225 |
-
"clean_up_tokenization_spaces": true,
|
| 226 |
-
"eos_token": "<|end_of_text|>",
|
| 227 |
-
"errors": "replace",
|
| 228 |
-
"extra_special_tokens": {},
|
| 229 |
-
"model_max_length": 9223372036854775807,
|
| 230 |
-
"pad_token": "<|end_of_text|>",
|
| 231 |
-
"padding_side": "left",
|
| 232 |
-
"tokenizer_class": "GPT2Tokenizer",
|
| 233 |
-
"unk_token": "<|end_of_text|>",
|
| 234 |
-
"vocab_size": 49152
|
| 235 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/alora/vocab.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/adapter_config.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alpha_pattern": {},
|
| 3 |
-
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "ibm-granite/granite-3.3-8b-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.05,
|
| 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 |
-
"k_proj",
|
| 27 |
-
"q_proj",
|
| 28 |
-
"v_proj"
|
| 29 |
-
],
|
| 30 |
-
"task_type": "CAUSAL_LM",
|
| 31 |
-
"use_dora": false,
|
| 32 |
-
"use_rslora": false
|
| 33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/adapter_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:27c8cf16a5ea98e110df54e433c43432ee8f18373f673293989e1deacee29cd7
|
| 3 |
-
size 94404160
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/added_tokens.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"<|end_of_cite|>": 49156,
|
| 3 |
-
"<|end_of_plugin|>": 49158,
|
| 4 |
-
"<|end_of_role|>": 49153,
|
| 5 |
-
"<|start_of_cite|>": 49155,
|
| 6 |
-
"<|start_of_plugin|>": 49157,
|
| 7 |
-
"<|start_of_role|>": 49152,
|
| 8 |
-
"<|tool_call|>": 49154
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/io.yaml
DELETED
|
@@ -1,58 +0,0 @@
|
|
| 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 |
-
"properties": {
|
| 7 |
-
"answer_relevance_analysis": {
|
| 8 |
-
"title": "Answer Relevance Analysis",
|
| 9 |
-
"type": "string"
|
| 10 |
-
},
|
| 11 |
-
"answer_relevance_category": {
|
| 12 |
-
"title": "Answer Relevance Category",
|
| 13 |
-
"type": "string",
|
| 14 |
-
"enum": [
|
| 15 |
-
"Pertinent",
|
| 16 |
-
"Pertinent with relevant extra",
|
| 17 |
-
"Excessive unnecessary information",
|
| 18 |
-
"Unduly restrictive",
|
| 19 |
-
"Too vague or generic",
|
| 20 |
-
"Contextual misalignment",
|
| 21 |
-
"Misinterpreted inquiry",
|
| 22 |
-
"No attempt"
|
| 23 |
-
]
|
| 24 |
-
},
|
| 25 |
-
"answer_relevance_judgment": {
|
| 26 |
-
"title": "Answer Relevance Judgment",
|
| 27 |
-
"type": "boolean"
|
| 28 |
-
}
|
| 29 |
-
},
|
| 30 |
-
"required": [
|
| 31 |
-
"answer_relevance_analysis",
|
| 32 |
-
"answer_relevance_category",
|
| 33 |
-
"answer_relevance_judgment"
|
| 34 |
-
],
|
| 35 |
-
"title": "AnswerRelevanceRawOutput",
|
| 36 |
-
"type": "object"
|
| 37 |
-
}
|
| 38 |
-
# Additional turn of instructions to add to the chat
|
| 39 |
-
instruction: "answer_relevance"
|
| 40 |
-
# Data transformations to perform during post-processing
|
| 41 |
-
transformations:
|
| 42 |
-
# Convert categorical answer to continuous value by decoding logprobs
|
| 43 |
-
- type: likelihood
|
| 44 |
-
categories_to_values:
|
| 45 |
-
true: 1.0
|
| 46 |
-
false: 0.0
|
| 47 |
-
input_path: ["answer_relevance_judgment"]
|
| 48 |
-
# Rename answer_relevance_judgment column to reflect likelihood transformation
|
| 49 |
-
- type: project
|
| 50 |
-
input_path: []
|
| 51 |
-
retained_fields:
|
| 52 |
-
"answer_relevance_analysis": "answer_relevance_analysis"
|
| 53 |
-
"answer_relevance_category": "answer_relevance_category"
|
| 54 |
-
"answer_relevance_judgment": "answer_relevance_likelihood"
|
| 55 |
-
parameters:
|
| 56 |
-
# Current LoRA can be quite verbose in its explanations.
|
| 57 |
-
max_completion_tokens: 1024
|
| 58 |
-
sentence_boundaries: ~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/merges.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/special_tokens_map.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"<|start_of_role|>",
|
| 4 |
-
"<|end_of_role|>",
|
| 5 |
-
"<|tool_call|>",
|
| 6 |
-
"<|start_of_cite|>",
|
| 7 |
-
"<|end_of_cite|>",
|
| 8 |
-
"<|start_of_plugin|>",
|
| 9 |
-
"<|end_of_plugin|>"
|
| 10 |
-
],
|
| 11 |
-
"bos_token": {
|
| 12 |
-
"content": "<|end_of_text|>",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false
|
| 17 |
-
},
|
| 18 |
-
"eos_token": {
|
| 19 |
-
"content": "<|end_of_text|>",
|
| 20 |
-
"lstrip": false,
|
| 21 |
-
"normalized": false,
|
| 22 |
-
"rstrip": false,
|
| 23 |
-
"single_word": false
|
| 24 |
-
},
|
| 25 |
-
"pad_token": {
|
| 26 |
-
"content": "<|end_of_text|>",
|
| 27 |
-
"lstrip": false,
|
| 28 |
-
"normalized": false,
|
| 29 |
-
"rstrip": false,
|
| 30 |
-
"single_word": false
|
| 31 |
-
},
|
| 32 |
-
"unk_token": {
|
| 33 |
-
"content": "<|end_of_text|>",
|
| 34 |
-
"lstrip": false,
|
| 35 |
-
"normalized": false,
|
| 36 |
-
"rstrip": false,
|
| 37 |
-
"single_word": false
|
| 38 |
-
}
|
| 39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/tokenizer_config.json
DELETED
|
@@ -1,235 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": false,
|
| 3 |
-
"add_prefix_space": false,
|
| 4 |
-
"added_tokens_decoder": {
|
| 5 |
-
"0": {
|
| 6 |
-
"content": "<|end_of_text|>",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": false,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false,
|
| 11 |
-
"special": true
|
| 12 |
-
},
|
| 13 |
-
"1": {
|
| 14 |
-
"content": "<fim_prefix>",
|
| 15 |
-
"lstrip": false,
|
| 16 |
-
"normalized": false,
|
| 17 |
-
"rstrip": false,
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"special": true
|
| 20 |
-
},
|
| 21 |
-
"2": {
|
| 22 |
-
"content": "<fim_middle>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": false,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false,
|
| 27 |
-
"special": true
|
| 28 |
-
},
|
| 29 |
-
"3": {
|
| 30 |
-
"content": "<fim_suffix>",
|
| 31 |
-
"lstrip": false,
|
| 32 |
-
"normalized": false,
|
| 33 |
-
"rstrip": false,
|
| 34 |
-
"single_word": false,
|
| 35 |
-
"special": true
|
| 36 |
-
},
|
| 37 |
-
"4": {
|
| 38 |
-
"content": "<fim_pad>",
|
| 39 |
-
"lstrip": false,
|
| 40 |
-
"normalized": false,
|
| 41 |
-
"rstrip": false,
|
| 42 |
-
"single_word": false,
|
| 43 |
-
"special": true
|
| 44 |
-
},
|
| 45 |
-
"5": {
|
| 46 |
-
"content": "<filename>",
|
| 47 |
-
"lstrip": false,
|
| 48 |
-
"normalized": false,
|
| 49 |
-
"rstrip": false,
|
| 50 |
-
"single_word": false,
|
| 51 |
-
"special": true
|
| 52 |
-
},
|
| 53 |
-
"6": {
|
| 54 |
-
"content": "<gh_stars>",
|
| 55 |
-
"lstrip": false,
|
| 56 |
-
"normalized": false,
|
| 57 |
-
"rstrip": false,
|
| 58 |
-
"single_word": false,
|
| 59 |
-
"special": true
|
| 60 |
-
},
|
| 61 |
-
"7": {
|
| 62 |
-
"content": "<issue_start>",
|
| 63 |
-
"lstrip": false,
|
| 64 |
-
"normalized": false,
|
| 65 |
-
"rstrip": false,
|
| 66 |
-
"single_word": false,
|
| 67 |
-
"special": true
|
| 68 |
-
},
|
| 69 |
-
"8": {
|
| 70 |
-
"content": "<issue_comment>",
|
| 71 |
-
"lstrip": false,
|
| 72 |
-
"normalized": false,
|
| 73 |
-
"rstrip": false,
|
| 74 |
-
"single_word": false,
|
| 75 |
-
"special": true
|
| 76 |
-
},
|
| 77 |
-
"9": {
|
| 78 |
-
"content": "<issue_closed>",
|
| 79 |
-
"lstrip": false,
|
| 80 |
-
"normalized": false,
|
| 81 |
-
"rstrip": false,
|
| 82 |
-
"single_word": false,
|
| 83 |
-
"special": true
|
| 84 |
-
},
|
| 85 |
-
"10": {
|
| 86 |
-
"content": "<jupyter_start>",
|
| 87 |
-
"lstrip": false,
|
| 88 |
-
"normalized": false,
|
| 89 |
-
"rstrip": false,
|
| 90 |
-
"single_word": false,
|
| 91 |
-
"special": true
|
| 92 |
-
},
|
| 93 |
-
"11": {
|
| 94 |
-
"content": "<jupyter_text>",
|
| 95 |
-
"lstrip": false,
|
| 96 |
-
"normalized": false,
|
| 97 |
-
"rstrip": false,
|
| 98 |
-
"single_word": false,
|
| 99 |
-
"special": true
|
| 100 |
-
},
|
| 101 |
-
"12": {
|
| 102 |
-
"content": "<jupyter_code>",
|
| 103 |
-
"lstrip": false,
|
| 104 |
-
"normalized": false,
|
| 105 |
-
"rstrip": false,
|
| 106 |
-
"single_word": false,
|
| 107 |
-
"special": true
|
| 108 |
-
},
|
| 109 |
-
"13": {
|
| 110 |
-
"content": "<jupyter_output>",
|
| 111 |
-
"lstrip": false,
|
| 112 |
-
"normalized": false,
|
| 113 |
-
"rstrip": false,
|
| 114 |
-
"single_word": false,
|
| 115 |
-
"special": true
|
| 116 |
-
},
|
| 117 |
-
"14": {
|
| 118 |
-
"content": "<empty_output>",
|
| 119 |
-
"lstrip": false,
|
| 120 |
-
"normalized": false,
|
| 121 |
-
"rstrip": false,
|
| 122 |
-
"single_word": false,
|
| 123 |
-
"special": true
|
| 124 |
-
},
|
| 125 |
-
"15": {
|
| 126 |
-
"content": "<commit_before>",
|
| 127 |
-
"lstrip": false,
|
| 128 |
-
"normalized": false,
|
| 129 |
-
"rstrip": false,
|
| 130 |
-
"single_word": false,
|
| 131 |
-
"special": true
|
| 132 |
-
},
|
| 133 |
-
"16": {
|
| 134 |
-
"content": "<commit_msg>",
|
| 135 |
-
"lstrip": false,
|
| 136 |
-
"normalized": false,
|
| 137 |
-
"rstrip": false,
|
| 138 |
-
"single_word": false,
|
| 139 |
-
"special": true
|
| 140 |
-
},
|
| 141 |
-
"17": {
|
| 142 |
-
"content": "<commit_after>",
|
| 143 |
-
"lstrip": false,
|
| 144 |
-
"normalized": false,
|
| 145 |
-
"rstrip": false,
|
| 146 |
-
"single_word": false,
|
| 147 |
-
"special": true
|
| 148 |
-
},
|
| 149 |
-
"18": {
|
| 150 |
-
"content": "<reponame>",
|
| 151 |
-
"lstrip": false,
|
| 152 |
-
"normalized": false,
|
| 153 |
-
"rstrip": false,
|
| 154 |
-
"single_word": false,
|
| 155 |
-
"special": true
|
| 156 |
-
},
|
| 157 |
-
"49152": {
|
| 158 |
-
"content": "<|start_of_role|>",
|
| 159 |
-
"lstrip": false,
|
| 160 |
-
"normalized": false,
|
| 161 |
-
"rstrip": false,
|
| 162 |
-
"single_word": false,
|
| 163 |
-
"special": true
|
| 164 |
-
},
|
| 165 |
-
"49153": {
|
| 166 |
-
"content": "<|end_of_role|>",
|
| 167 |
-
"lstrip": false,
|
| 168 |
-
"normalized": false,
|
| 169 |
-
"rstrip": false,
|
| 170 |
-
"single_word": false,
|
| 171 |
-
"special": true
|
| 172 |
-
},
|
| 173 |
-
"49154": {
|
| 174 |
-
"content": "<|tool_call|>",
|
| 175 |
-
"lstrip": false,
|
| 176 |
-
"normalized": false,
|
| 177 |
-
"rstrip": false,
|
| 178 |
-
"single_word": false,
|
| 179 |
-
"special": true
|
| 180 |
-
},
|
| 181 |
-
"49155": {
|
| 182 |
-
"content": "<|start_of_cite|>",
|
| 183 |
-
"lstrip": false,
|
| 184 |
-
"normalized": false,
|
| 185 |
-
"rstrip": false,
|
| 186 |
-
"single_word": false,
|
| 187 |
-
"special": true
|
| 188 |
-
},
|
| 189 |
-
"49156": {
|
| 190 |
-
"content": "<|end_of_cite|>",
|
| 191 |
-
"lstrip": false,
|
| 192 |
-
"normalized": false,
|
| 193 |
-
"rstrip": false,
|
| 194 |
-
"single_word": false,
|
| 195 |
-
"special": true
|
| 196 |
-
},
|
| 197 |
-
"49157": {
|
| 198 |
-
"content": "<|start_of_plugin|>",
|
| 199 |
-
"lstrip": false,
|
| 200 |
-
"normalized": false,
|
| 201 |
-
"rstrip": false,
|
| 202 |
-
"single_word": false,
|
| 203 |
-
"special": true
|
| 204 |
-
},
|
| 205 |
-
"49158": {
|
| 206 |
-
"content": "<|end_of_plugin|>",
|
| 207 |
-
"lstrip": false,
|
| 208 |
-
"normalized": false,
|
| 209 |
-
"rstrip": false,
|
| 210 |
-
"single_word": false,
|
| 211 |
-
"special": true
|
| 212 |
-
}
|
| 213 |
-
},
|
| 214 |
-
"additional_special_tokens": [
|
| 215 |
-
"<|start_of_role|>",
|
| 216 |
-
"<|end_of_role|>",
|
| 217 |
-
"<|tool_call|>",
|
| 218 |
-
"<|start_of_cite|>",
|
| 219 |
-
"<|end_of_cite|>",
|
| 220 |
-
"<|start_of_plugin|>",
|
| 221 |
-
"<|end_of_plugin|>"
|
| 222 |
-
],
|
| 223 |
-
"bos_token": "<|end_of_text|>",
|
| 224 |
-
"chat_template": "{# Alias tools -> available_tools #}\n{%- if tools and not available_tools -%}\n {%- set available_tools = tools -%}\n{%- endif -%}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n {%- else %}\n {%- set system_message = \"Knowledge Cutoff Date: April 2024.\nToday's Date: \" + strftime_now('%B %d, %Y') + \".\nYou are Granite, developed by IBM.\" %}\n {%- if available_tools and documents %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\nWrite the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif available_tools %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\" %}\n {%- elif documents %}\n {%- set system_message = system_message + \" Write the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif thinking %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\nRespond to every user query in a comprehensive and detailed way. You can write down your thoughts and reasoning process before responding. In the thought process, engage in a comprehensive cycle of analysis, summarization, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. In the response section, based on various attempts, explorations, and reflections from the thoughts section, systematically present the final solution that you deem correct. The response should summarize the thought process. Write your thoughts between <think></think> and write your response between <response></response> for each user query.\" %}\n {%- else %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\" %}\n {%- endif %}\n {%- if 'citations' in controls and documents %}\n {%- set system_message = system_message + '\nUse the symbols <|start_of_cite|> and <|end_of_cite|> to indicate when a fact comes from a document in the search result, e.g <|start_of_cite|> {document_id: 1}my fact <|end_of_cite|> for a fact from document 1. Afterwards, list all the citations with their corresponding documents in an ordered list.' %}\n {%- endif %}\n {%- if 'hallucinations' in controls and documents %}\n {%- set system_message = system_message + '\nFinally, after the response is written, include a numbered list of sentences from the response with a corresponding risk value that are hallucinated and not based in the documents.' %}\n {%- endif %}\n {%- set loop_messages = messages %}\n {%- endif %}\n {{- '<|start_of_role|>system<|end_of_role|>' + system_message + '<|end_of_text|>\n' }}\n {%- if available_tools %}\n {{- '<|start_of_role|>available_tools<|end_of_role|>' }}\n {{- available_tools | tojson(indent=4) }}\n {{- '<|end_of_text|>\n' }}\n {%- endif %}\n {%- if documents %}\n {%- for document in documents %}\n {{- '<|start_of_role|>document {\"document_id\": \"' + document['doc_id'] | string + '\"}<|end_of_role|>\n' }}\n {{- document['text'] }}\n {{- '<|end_of_text|>\n' }}\n {%- endfor %}\n {%- endif %}\n {%- for message in loop_messages %}\n {{- '<|start_of_role|>' + message['role'] + '<|end_of_role|>' + message['content'] + '<|end_of_text|>\n' }}\n {%- if loop.last and add_generation_prompt %}\n {{- '<|start_of_role|>assistant' }}\n {%- if controls %}\n {{- ' ' + controls | tojson()}}\n {%- endif %}\n {{- '<|end_of_role|>' }}\n {%- endif %}\n {%- endfor %}",
|
| 225 |
-
"clean_up_tokenization_spaces": true,
|
| 226 |
-
"eos_token": "<|end_of_text|>",
|
| 227 |
-
"errors": "replace",
|
| 228 |
-
"extra_special_tokens": {},
|
| 229 |
-
"model_max_length": 9223372036854775807,
|
| 230 |
-
"pad_token": "<|end_of_text|>",
|
| 231 |
-
"padding_side": "left",
|
| 232 |
-
"tokenizer_class": "GPT2Tokenizer",
|
| 233 |
-
"unk_token": "<|end_of_text|>",
|
| 234 |
-
"vocab_size": 49152
|
| 235 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-3.3-8b-instruct/lora/vocab.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/adapter_config.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alora_invocation_tokens": null,
|
| 3 |
-
"alpha_pattern": {},
|
| 4 |
-
"arrow_config": null,
|
| 5 |
-
"auto_mapping": null,
|
| 6 |
-
"base_model_name_or_path": "ibm-granite/granite-4.0-micro",
|
| 7 |
-
"bias": "none",
|
| 8 |
-
"corda_config": null,
|
| 9 |
-
"ensure_weight_tying": false,
|
| 10 |
-
"eva_config": null,
|
| 11 |
-
"exclude_modules": null,
|
| 12 |
-
"fan_in_fan_out": false,
|
| 13 |
-
"inference_mode": true,
|
| 14 |
-
"init_lora_weights": true,
|
| 15 |
-
"layer_replication": null,
|
| 16 |
-
"layers_pattern": null,
|
| 17 |
-
"layers_to_transform": null,
|
| 18 |
-
"loftq_config": {},
|
| 19 |
-
"lora_alpha": 32,
|
| 20 |
-
"lora_bias": false,
|
| 21 |
-
"lora_dropout": 0.05,
|
| 22 |
-
"megatron_config": null,
|
| 23 |
-
"megatron_core": "megatron.core",
|
| 24 |
-
"modules_to_save": null,
|
| 25 |
-
"peft_type": "LORA",
|
| 26 |
-
"peft_version": "0.17.2.dev0@98a88c01a42be4bb2fa13a1c0dd5340c42f82c87",
|
| 27 |
-
"qalora_group_size": 16,
|
| 28 |
-
"r": 32,
|
| 29 |
-
"rank_pattern": {},
|
| 30 |
-
"revision": null,
|
| 31 |
-
"target_modules": [
|
| 32 |
-
"k_proj",
|
| 33 |
-
"v_proj",
|
| 34 |
-
"q_proj"
|
| 35 |
-
],
|
| 36 |
-
"target_parameters": null,
|
| 37 |
-
"task_type": "CAUSAL_LM",
|
| 38 |
-
"trainable_token_indices": null,
|
| 39 |
-
"use_dora": false,
|
| 40 |
-
"use_qalora": false,
|
| 41 |
-
"use_rslora": false
|
| 42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/adapter_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8c2e3569f17bbe2ccd7f6d6c52ce879ae1f04258b0fba908bec4ee99fc4c0b6f
|
| 3 |
-
size 57703888
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/chat_template.jinja
DELETED
|
@@ -1,118 +0,0 @@
|
|
| 1 |
-
{%- set tools_system_message_prefix = 'You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>' %}
|
| 2 |
-
{%- set tools_system_message_suffix = '\n</tools>\n\nFor each tool call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.' %}
|
| 3 |
-
{%- set documents_system_message_prefix = 'You are a helpful assistant with access to the following documents. You may use one or more documents to assist with the user query.\n\nYou are given a list of documents within <documents></documents> XML tags:\n<documents>' %}
|
| 4 |
-
{%- set documents_system_message_suffix = '\n</documents>\n\nWrite the response to the user\'s input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.' %}
|
| 5 |
-
{%- set g4_default_system_message = 'You are a helpful assistant. Please ensure responses are professional, accurate, and safe.' %}
|
| 6 |
-
{%- if available_tools is defined and available_tools %}
|
| 7 |
-
{%- set tools = available_tools %}
|
| 8 |
-
{%- endif %}
|
| 9 |
-
{%- set ns = namespace(tools_system_message=tools_system_message_prefix,
|
| 10 |
-
documents_system_message=documents_system_message_prefix,
|
| 11 |
-
default_system_message=g4_default_system_message,
|
| 12 |
-
system_message=''
|
| 13 |
-
) %}
|
| 14 |
-
{%- if tools %}
|
| 15 |
-
{%- for tool in tools %}
|
| 16 |
-
{%- set ns.tools_system_message = ns.tools_system_message + '\n' + (tool | tojson) %}
|
| 17 |
-
{%- endfor %}
|
| 18 |
-
{%- set ns.tools_system_message = ns.tools_system_message + tools_system_message_suffix %}
|
| 19 |
-
{%- else %}
|
| 20 |
-
{%- set ns.tools_system_message = '' %}
|
| 21 |
-
{%- endif %}
|
| 22 |
-
{%- if documents %}
|
| 23 |
-
{%- for document in documents %}
|
| 24 |
-
{%- set ns.documents_system_message = ns.documents_system_message + '\n' + (document | tojson) %}
|
| 25 |
-
{%- endfor %}
|
| 26 |
-
{%- set ns.documents_system_message = ns.documents_system_message + documents_system_message_suffix %}
|
| 27 |
-
{%- else %}
|
| 28 |
-
{%- set ns.documents_system_message = '' %}
|
| 29 |
-
{%- endif %}
|
| 30 |
-
{%- if messages[0].role == 'system' %}
|
| 31 |
-
{%- if messages[0].content is string %}
|
| 32 |
-
{%- set ns.system_message = messages[0].content %}
|
| 33 |
-
{%- elif messages[0].content is iterable %}
|
| 34 |
-
{%- for entry in messages[0].content %}
|
| 35 |
-
{%- if entry.type== 'text' %}
|
| 36 |
-
{%- if ns.system_message != '' %}
|
| 37 |
-
{%- set ns.system_message = ns.system_message + '\n' %}
|
| 38 |
-
{%- endif %}
|
| 39 |
-
{%- set ns.system_message = ns.system_message + entry.text %}
|
| 40 |
-
{%- endif %}
|
| 41 |
-
{%- endfor %}
|
| 42 |
-
{%- endif %}
|
| 43 |
-
{%- if tools and documents %}
|
| 44 |
-
{%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message + '\n\n' + ns.documents_system_message %}
|
| 45 |
-
{%- elif tools %}
|
| 46 |
-
{%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message %}
|
| 47 |
-
{%- elif documents %}
|
| 48 |
-
{%- set ns.system_message = ns.system_message + '\n\n' + ns.documents_system_message %}
|
| 49 |
-
{%- endif %}
|
| 50 |
-
{%- else %}
|
| 51 |
-
{%- if tools and documents %}
|
| 52 |
-
{%- set ns.system_message = ns.tools_system_message + '\n\n' + ns.documents_system_message %}
|
| 53 |
-
{%- elif tools %}
|
| 54 |
-
{%- set ns.system_message = ns.tools_system_message %}
|
| 55 |
-
{%- elif documents %}
|
| 56 |
-
{%- set ns.system_message = ns.documents_system_message %}
|
| 57 |
-
{%- endif %}
|
| 58 |
-
{%- endif %}
|
| 59 |
-
{%- if ns.system_message %}
|
| 60 |
-
{{- '<|start_of_role|>system<|end_of_role|>' + ns.system_message + '<|end_of_text|>\n' }}
|
| 61 |
-
{%- else %}
|
| 62 |
-
{{- '<|start_of_role|>system<|end_of_role|>' + ns.default_system_message + '<|end_of_text|>\n' }}
|
| 63 |
-
{%- endif %}
|
| 64 |
-
{%- for message in messages %}
|
| 65 |
-
{%- set content = namespace(val='') %}
|
| 66 |
-
{%- if message.content is string %}
|
| 67 |
-
{%- set content.val = message.content %}
|
| 68 |
-
{%- else %}
|
| 69 |
-
{%- if message.content is iterable %}
|
| 70 |
-
{%- for entry in message.content %}
|
| 71 |
-
{%- if entry.type== 'text' %}
|
| 72 |
-
{%- if content.val != '' %}
|
| 73 |
-
{%- set content.val = content.val + '\n' %}
|
| 74 |
-
{%- endif %}
|
| 75 |
-
{%- set content.val = content.val + entry.text %}
|
| 76 |
-
{%- endif %}
|
| 77 |
-
{%- endfor %}
|
| 78 |
-
{%- endif %}
|
| 79 |
-
{%- endif %}
|
| 80 |
-
{%- if (message.role == 'user') or (message.role == 'system' and not loop.first) %}
|
| 81 |
-
{{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val + '<|end_of_text|>\n' }}
|
| 82 |
-
{%- elif message.role == 'assistant' %}
|
| 83 |
-
{{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val }}
|
| 84 |
-
{%- if message.tool_calls %}
|
| 85 |
-
{%- for tool_call in message.tool_calls %}
|
| 86 |
-
{%- if (loop.first and content.val) or (not loop.first) %}
|
| 87 |
-
{{- '\n' }}
|
| 88 |
-
{%- endif %}
|
| 89 |
-
{%- if tool_call.function %}
|
| 90 |
-
{%- set tool_call = tool_call.function %}
|
| 91 |
-
{%- endif %}
|
| 92 |
-
{{- '<tool_call>\n{"name": "' }}
|
| 93 |
-
{{- tool_call.name }}
|
| 94 |
-
{{- '", "arguments": ' }}
|
| 95 |
-
{%- if tool_call.arguments is string %}
|
| 96 |
-
{{- tool_call.arguments }}
|
| 97 |
-
{%- else %}
|
| 98 |
-
{{- tool_call.arguments | tojson }}
|
| 99 |
-
{%- endif %}
|
| 100 |
-
{{- '}\n</tool_call>' }}
|
| 101 |
-
{%- endfor %}
|
| 102 |
-
{%- endif %}
|
| 103 |
-
{{- '<|end_of_text|>\n' }}
|
| 104 |
-
{%- elif message.role == 'tool' %}
|
| 105 |
-
{%- if loop.first or (messages[loop.index0 - 1].role != 'tool') %}
|
| 106 |
-
{{- '<|start_of_role|>user<|end_of_role|>' }}
|
| 107 |
-
{%- endif %}
|
| 108 |
-
{{- '\n<tool_response>\n' }}
|
| 109 |
-
{{- content.val }}
|
| 110 |
-
{{- '\n</tool_response>' }}
|
| 111 |
-
{%- if loop.last or (messages[loop.index0 + 1].role != 'tool') %}
|
| 112 |
-
{{- '<|end_of_text|>\n' }}
|
| 113 |
-
{%- endif %}
|
| 114 |
-
{%- endif %}
|
| 115 |
-
{%- endfor %}
|
| 116 |
-
{%- if add_generation_prompt %}
|
| 117 |
-
{{- '<|start_of_role|>assistant<|end_of_role|>' }}
|
| 118 |
-
{%- endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/io.yaml
DELETED
|
@@ -1,58 +0,0 @@
|
|
| 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 |
-
"properties": {
|
| 7 |
-
"answer_relevance_analysis": {
|
| 8 |
-
"title": "Answer Relevance Analysis",
|
| 9 |
-
"type": "string"
|
| 10 |
-
},
|
| 11 |
-
"answer_relevance_category": {
|
| 12 |
-
"title": "Answer Relevance Category",
|
| 13 |
-
"type": "string",
|
| 14 |
-
"enum": [
|
| 15 |
-
"Pertinent",
|
| 16 |
-
"Pertinent with relevant extra",
|
| 17 |
-
"Excessive unnecessary information",
|
| 18 |
-
"Unduly restrictive",
|
| 19 |
-
"Too vague or generic",
|
| 20 |
-
"Contextual misalignment",
|
| 21 |
-
"Misinterpreted inquiry",
|
| 22 |
-
"No attempt"
|
| 23 |
-
]
|
| 24 |
-
},
|
| 25 |
-
"answer_relevance_judgment": {
|
| 26 |
-
"title": "Answer Relevance Judgment",
|
| 27 |
-
"type": "boolean"
|
| 28 |
-
}
|
| 29 |
-
},
|
| 30 |
-
"required": [
|
| 31 |
-
"answer_relevance_analysis",
|
| 32 |
-
"answer_relevance_category",
|
| 33 |
-
"answer_relevance_judgment"
|
| 34 |
-
],
|
| 35 |
-
"title": "AnswerRelevanceRawOutput",
|
| 36 |
-
"type": "object"
|
| 37 |
-
}
|
| 38 |
-
# Additional turn of instructions to add to the chat
|
| 39 |
-
instruction: "answer_relevance"
|
| 40 |
-
# Data transformations to perform during post-processing
|
| 41 |
-
transformations:
|
| 42 |
-
# Convert categorical answer to continuous value by decoding logprobs
|
| 43 |
-
- type: likelihood
|
| 44 |
-
categories_to_values:
|
| 45 |
-
true: 1.0
|
| 46 |
-
false: 0.0
|
| 47 |
-
input_path: ["answer_relevance_judgment"]
|
| 48 |
-
# Rename answer_relevance_judgment column to reflect likelihood transformation
|
| 49 |
-
- type: project
|
| 50 |
-
input_path: []
|
| 51 |
-
retained_fields:
|
| 52 |
-
"answer_relevance_analysis": "answer_relevance_analysis"
|
| 53 |
-
"answer_relevance_category": "answer_relevance_category"
|
| 54 |
-
"answer_relevance_judgment": "answer_relevance_likelihood"
|
| 55 |
-
parameters:
|
| 56 |
-
# Current LoRA can be quite verbose in its explanations.
|
| 57 |
-
max_completion_tokens: 1024
|
| 58 |
-
sentence_boundaries: ~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/merges.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/special_tokens_map.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"bos_token": {
|
| 3 |
-
"content": "<|end_of_text|>",
|
| 4 |
-
"lstrip": false,
|
| 5 |
-
"normalized": false,
|
| 6 |
-
"rstrip": false,
|
| 7 |
-
"single_word": false
|
| 8 |
-
},
|
| 9 |
-
"eos_token": {
|
| 10 |
-
"content": "<|end_of_text|>",
|
| 11 |
-
"lstrip": false,
|
| 12 |
-
"normalized": false,
|
| 13 |
-
"rstrip": false,
|
| 14 |
-
"single_word": false
|
| 15 |
-
},
|
| 16 |
-
"pad_token": {
|
| 17 |
-
"content": "<|pad|>",
|
| 18 |
-
"lstrip": false,
|
| 19 |
-
"normalized": false,
|
| 20 |
-
"rstrip": false,
|
| 21 |
-
"single_word": false
|
| 22 |
-
},
|
| 23 |
-
"unk_token": {
|
| 24 |
-
"content": "<|unk|>",
|
| 25 |
-
"lstrip": false,
|
| 26 |
-
"normalized": false,
|
| 27 |
-
"rstrip": false,
|
| 28 |
-
"single_word": false
|
| 29 |
-
}
|
| 30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/tokenizer_config.json
DELETED
|
@@ -1,783 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": false,
|
| 3 |
-
"add_prefix_space": false,
|
| 4 |
-
"added_tokens_decoder": {
|
| 5 |
-
"100256": {
|
| 6 |
-
"content": "<|pad|>",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": false,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false,
|
| 11 |
-
"special": true
|
| 12 |
-
},
|
| 13 |
-
"100257": {
|
| 14 |
-
"content": "<|end_of_text|>",
|
| 15 |
-
"lstrip": false,
|
| 16 |
-
"normalized": false,
|
| 17 |
-
"rstrip": false,
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"special": true
|
| 20 |
-
},
|
| 21 |
-
"100258": {
|
| 22 |
-
"content": "<|fim_prefix|>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": false,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false,
|
| 27 |
-
"special": false
|
| 28 |
-
},
|
| 29 |
-
"100259": {
|
| 30 |
-
"content": "<|fim_middle|>",
|
| 31 |
-
"lstrip": false,
|
| 32 |
-
"normalized": false,
|
| 33 |
-
"rstrip": false,
|
| 34 |
-
"single_word": false,
|
| 35 |
-
"special": false
|
| 36 |
-
},
|
| 37 |
-
"100260": {
|
| 38 |
-
"content": "<|fim_suffix|>",
|
| 39 |
-
"lstrip": false,
|
| 40 |
-
"normalized": false,
|
| 41 |
-
"rstrip": false,
|
| 42 |
-
"single_word": false,
|
| 43 |
-
"special": false
|
| 44 |
-
},
|
| 45 |
-
"100261": {
|
| 46 |
-
"content": "<|fim_pad|>",
|
| 47 |
-
"lstrip": false,
|
| 48 |
-
"normalized": false,
|
| 49 |
-
"rstrip": false,
|
| 50 |
-
"single_word": false,
|
| 51 |
-
"special": false
|
| 52 |
-
},
|
| 53 |
-
"100262": {
|
| 54 |
-
"content": "<|filename|>",
|
| 55 |
-
"lstrip": false,
|
| 56 |
-
"normalized": false,
|
| 57 |
-
"rstrip": false,
|
| 58 |
-
"single_word": false,
|
| 59 |
-
"special": false
|
| 60 |
-
},
|
| 61 |
-
"100263": {
|
| 62 |
-
"content": "<|reponame|>",
|
| 63 |
-
"lstrip": false,
|
| 64 |
-
"normalized": false,
|
| 65 |
-
"rstrip": false,
|
| 66 |
-
"single_word": false,
|
| 67 |
-
"special": false
|
| 68 |
-
},
|
| 69 |
-
"100264": {
|
| 70 |
-
"content": "<|start_of_role|>",
|
| 71 |
-
"lstrip": false,
|
| 72 |
-
"normalized": false,
|
| 73 |
-
"rstrip": false,
|
| 74 |
-
"single_word": false,
|
| 75 |
-
"special": true
|
| 76 |
-
},
|
| 77 |
-
"100265": {
|
| 78 |
-
"content": "<|end_of_role|>",
|
| 79 |
-
"lstrip": false,
|
| 80 |
-
"normalized": false,
|
| 81 |
-
"rstrip": false,
|
| 82 |
-
"single_word": false,
|
| 83 |
-
"special": true
|
| 84 |
-
},
|
| 85 |
-
"100266": {
|
| 86 |
-
"content": "<|unused_1|>",
|
| 87 |
-
"lstrip": false,
|
| 88 |
-
"normalized": false,
|
| 89 |
-
"rstrip": false,
|
| 90 |
-
"single_word": false,
|
| 91 |
-
"special": true
|
| 92 |
-
},
|
| 93 |
-
"100267": {
|
| 94 |
-
"content": "<|start_of_plugin|>",
|
| 95 |
-
"lstrip": false,
|
| 96 |
-
"normalized": false,
|
| 97 |
-
"rstrip": false,
|
| 98 |
-
"single_word": false,
|
| 99 |
-
"special": true
|
| 100 |
-
},
|
| 101 |
-
"100268": {
|
| 102 |
-
"content": "<|end_of_plugin|>",
|
| 103 |
-
"lstrip": false,
|
| 104 |
-
"normalized": false,
|
| 105 |
-
"rstrip": false,
|
| 106 |
-
"single_word": false,
|
| 107 |
-
"special": true
|
| 108 |
-
},
|
| 109 |
-
"100269": {
|
| 110 |
-
"content": "<|unk|>",
|
| 111 |
-
"lstrip": false,
|
| 112 |
-
"normalized": false,
|
| 113 |
-
"rstrip": false,
|
| 114 |
-
"single_word": false,
|
| 115 |
-
"special": true
|
| 116 |
-
},
|
| 117 |
-
"100270": {
|
| 118 |
-
"content": "<tool_call>",
|
| 119 |
-
"lstrip": false,
|
| 120 |
-
"normalized": false,
|
| 121 |
-
"rstrip": false,
|
| 122 |
-
"single_word": false,
|
| 123 |
-
"special": false
|
| 124 |
-
},
|
| 125 |
-
"100271": {
|
| 126 |
-
"content": "</tool_call>",
|
| 127 |
-
"lstrip": false,
|
| 128 |
-
"normalized": false,
|
| 129 |
-
"rstrip": false,
|
| 130 |
-
"single_word": false,
|
| 131 |
-
"special": false
|
| 132 |
-
},
|
| 133 |
-
"100272": {
|
| 134 |
-
"content": "<tool_response>",
|
| 135 |
-
"lstrip": false,
|
| 136 |
-
"normalized": false,
|
| 137 |
-
"rstrip": false,
|
| 138 |
-
"single_word": false,
|
| 139 |
-
"special": false
|
| 140 |
-
},
|
| 141 |
-
"100273": {
|
| 142 |
-
"content": "</tool_response>",
|
| 143 |
-
"lstrip": false,
|
| 144 |
-
"normalized": false,
|
| 145 |
-
"rstrip": false,
|
| 146 |
-
"single_word": false,
|
| 147 |
-
"special": false
|
| 148 |
-
},
|
| 149 |
-
"100274": {
|
| 150 |
-
"content": "<think>",
|
| 151 |
-
"lstrip": false,
|
| 152 |
-
"normalized": false,
|
| 153 |
-
"rstrip": false,
|
| 154 |
-
"single_word": false,
|
| 155 |
-
"special": false
|
| 156 |
-
},
|
| 157 |
-
"100275": {
|
| 158 |
-
"content": "</think>",
|
| 159 |
-
"lstrip": false,
|
| 160 |
-
"normalized": false,
|
| 161 |
-
"rstrip": false,
|
| 162 |
-
"single_word": false,
|
| 163 |
-
"special": false
|
| 164 |
-
},
|
| 165 |
-
"100276": {
|
| 166 |
-
"content": "<think_on>",
|
| 167 |
-
"lstrip": false,
|
| 168 |
-
"normalized": false,
|
| 169 |
-
"rstrip": false,
|
| 170 |
-
"single_word": false,
|
| 171 |
-
"special": true
|
| 172 |
-
},
|
| 173 |
-
"100277": {
|
| 174 |
-
"content": "<think_off>",
|
| 175 |
-
"lstrip": false,
|
| 176 |
-
"normalized": false,
|
| 177 |
-
"rstrip": false,
|
| 178 |
-
"single_word": false,
|
| 179 |
-
"special": true
|
| 180 |
-
},
|
| 181 |
-
"100278": {
|
| 182 |
-
"content": "<schema>",
|
| 183 |
-
"lstrip": false,
|
| 184 |
-
"normalized": false,
|
| 185 |
-
"rstrip": false,
|
| 186 |
-
"single_word": false,
|
| 187 |
-
"special": true
|
| 188 |
-
},
|
| 189 |
-
"100279": {
|
| 190 |
-
"content": "</schema>",
|
| 191 |
-
"lstrip": false,
|
| 192 |
-
"normalized": false,
|
| 193 |
-
"rstrip": false,
|
| 194 |
-
"single_word": false,
|
| 195 |
-
"special": true
|
| 196 |
-
},
|
| 197 |
-
"100280": {
|
| 198 |
-
"content": "<tools>",
|
| 199 |
-
"lstrip": false,
|
| 200 |
-
"normalized": false,
|
| 201 |
-
"rstrip": false,
|
| 202 |
-
"single_word": false,
|
| 203 |
-
"special": true
|
| 204 |
-
},
|
| 205 |
-
"100281": {
|
| 206 |
-
"content": "</tools>",
|
| 207 |
-
"lstrip": false,
|
| 208 |
-
"normalized": false,
|
| 209 |
-
"rstrip": false,
|
| 210 |
-
"single_word": false,
|
| 211 |
-
"special": true
|
| 212 |
-
},
|
| 213 |
-
"100282": {
|
| 214 |
-
"content": "<documents>",
|
| 215 |
-
"lstrip": false,
|
| 216 |
-
"normalized": false,
|
| 217 |
-
"rstrip": false,
|
| 218 |
-
"single_word": false,
|
| 219 |
-
"special": true
|
| 220 |
-
},
|
| 221 |
-
"100283": {
|
| 222 |
-
"content": "</documents>",
|
| 223 |
-
"lstrip": false,
|
| 224 |
-
"normalized": false,
|
| 225 |
-
"rstrip": false,
|
| 226 |
-
"single_word": false,
|
| 227 |
-
"special": true
|
| 228 |
-
},
|
| 229 |
-
"100284": {
|
| 230 |
-
"content": "<|unused_15|>",
|
| 231 |
-
"lstrip": false,
|
| 232 |
-
"normalized": false,
|
| 233 |
-
"rstrip": false,
|
| 234 |
-
"single_word": false,
|
| 235 |
-
"special": true
|
| 236 |
-
},
|
| 237 |
-
"100285": {
|
| 238 |
-
"content": "<|unused_16|>",
|
| 239 |
-
"lstrip": false,
|
| 240 |
-
"normalized": false,
|
| 241 |
-
"rstrip": false,
|
| 242 |
-
"single_word": false,
|
| 243 |
-
"special": true
|
| 244 |
-
},
|
| 245 |
-
"100286": {
|
| 246 |
-
"content": "<|unused_17|>",
|
| 247 |
-
"lstrip": false,
|
| 248 |
-
"normalized": false,
|
| 249 |
-
"rstrip": false,
|
| 250 |
-
"single_word": false,
|
| 251 |
-
"special": true
|
| 252 |
-
},
|
| 253 |
-
"100287": {
|
| 254 |
-
"content": "<|unused_18|>",
|
| 255 |
-
"lstrip": false,
|
| 256 |
-
"normalized": false,
|
| 257 |
-
"rstrip": false,
|
| 258 |
-
"single_word": false,
|
| 259 |
-
"special": true
|
| 260 |
-
},
|
| 261 |
-
"100288": {
|
| 262 |
-
"content": "<|unused_19|>",
|
| 263 |
-
"lstrip": false,
|
| 264 |
-
"normalized": false,
|
| 265 |
-
"rstrip": false,
|
| 266 |
-
"single_word": false,
|
| 267 |
-
"special": true
|
| 268 |
-
},
|
| 269 |
-
"100289": {
|
| 270 |
-
"content": "<|unused_20|>",
|
| 271 |
-
"lstrip": false,
|
| 272 |
-
"normalized": false,
|
| 273 |
-
"rstrip": false,
|
| 274 |
-
"single_word": false,
|
| 275 |
-
"special": true
|
| 276 |
-
},
|
| 277 |
-
"100290": {
|
| 278 |
-
"content": "<|unused_21|>",
|
| 279 |
-
"lstrip": false,
|
| 280 |
-
"normalized": false,
|
| 281 |
-
"rstrip": false,
|
| 282 |
-
"single_word": false,
|
| 283 |
-
"special": true
|
| 284 |
-
},
|
| 285 |
-
"100291": {
|
| 286 |
-
"content": "<|unused_22|>",
|
| 287 |
-
"lstrip": false,
|
| 288 |
-
"normalized": false,
|
| 289 |
-
"rstrip": false,
|
| 290 |
-
"single_word": false,
|
| 291 |
-
"special": true
|
| 292 |
-
},
|
| 293 |
-
"100292": {
|
| 294 |
-
"content": "<|unused_23|>",
|
| 295 |
-
"lstrip": false,
|
| 296 |
-
"normalized": false,
|
| 297 |
-
"rstrip": false,
|
| 298 |
-
"single_word": false,
|
| 299 |
-
"special": true
|
| 300 |
-
},
|
| 301 |
-
"100293": {
|
| 302 |
-
"content": "<|unused_24|>",
|
| 303 |
-
"lstrip": false,
|
| 304 |
-
"normalized": false,
|
| 305 |
-
"rstrip": false,
|
| 306 |
-
"single_word": false,
|
| 307 |
-
"special": true
|
| 308 |
-
},
|
| 309 |
-
"100294": {
|
| 310 |
-
"content": "<|unused_25|>",
|
| 311 |
-
"lstrip": false,
|
| 312 |
-
"normalized": false,
|
| 313 |
-
"rstrip": false,
|
| 314 |
-
"single_word": false,
|
| 315 |
-
"special": true
|
| 316 |
-
},
|
| 317 |
-
"100295": {
|
| 318 |
-
"content": "<|unused_26|>",
|
| 319 |
-
"lstrip": false,
|
| 320 |
-
"normalized": false,
|
| 321 |
-
"rstrip": false,
|
| 322 |
-
"single_word": false,
|
| 323 |
-
"special": true
|
| 324 |
-
},
|
| 325 |
-
"100296": {
|
| 326 |
-
"content": "<|unused_27|>",
|
| 327 |
-
"lstrip": false,
|
| 328 |
-
"normalized": false,
|
| 329 |
-
"rstrip": false,
|
| 330 |
-
"single_word": false,
|
| 331 |
-
"special": true
|
| 332 |
-
},
|
| 333 |
-
"100297": {
|
| 334 |
-
"content": "<|unused_28|>",
|
| 335 |
-
"lstrip": false,
|
| 336 |
-
"normalized": false,
|
| 337 |
-
"rstrip": false,
|
| 338 |
-
"single_word": false,
|
| 339 |
-
"special": true
|
| 340 |
-
},
|
| 341 |
-
"100298": {
|
| 342 |
-
"content": "<|unused_29|>",
|
| 343 |
-
"lstrip": false,
|
| 344 |
-
"normalized": false,
|
| 345 |
-
"rstrip": false,
|
| 346 |
-
"single_word": false,
|
| 347 |
-
"special": true
|
| 348 |
-
},
|
| 349 |
-
"100299": {
|
| 350 |
-
"content": "<|unused_30|>",
|
| 351 |
-
"lstrip": false,
|
| 352 |
-
"normalized": false,
|
| 353 |
-
"rstrip": false,
|
| 354 |
-
"single_word": false,
|
| 355 |
-
"special": true
|
| 356 |
-
},
|
| 357 |
-
"100300": {
|
| 358 |
-
"content": "<|unused_31|>",
|
| 359 |
-
"lstrip": false,
|
| 360 |
-
"normalized": false,
|
| 361 |
-
"rstrip": false,
|
| 362 |
-
"single_word": false,
|
| 363 |
-
"special": true
|
| 364 |
-
},
|
| 365 |
-
"100301": {
|
| 366 |
-
"content": "<|unused_32|>",
|
| 367 |
-
"lstrip": false,
|
| 368 |
-
"normalized": false,
|
| 369 |
-
"rstrip": false,
|
| 370 |
-
"single_word": false,
|
| 371 |
-
"special": true
|
| 372 |
-
},
|
| 373 |
-
"100302": {
|
| 374 |
-
"content": "<|unused_33|>",
|
| 375 |
-
"lstrip": false,
|
| 376 |
-
"normalized": false,
|
| 377 |
-
"rstrip": false,
|
| 378 |
-
"single_word": false,
|
| 379 |
-
"special": true
|
| 380 |
-
},
|
| 381 |
-
"100303": {
|
| 382 |
-
"content": "<|unused_34|>",
|
| 383 |
-
"lstrip": false,
|
| 384 |
-
"normalized": false,
|
| 385 |
-
"rstrip": false,
|
| 386 |
-
"single_word": false,
|
| 387 |
-
"special": true
|
| 388 |
-
},
|
| 389 |
-
"100304": {
|
| 390 |
-
"content": "<|unused_35|>",
|
| 391 |
-
"lstrip": false,
|
| 392 |
-
"normalized": false,
|
| 393 |
-
"rstrip": false,
|
| 394 |
-
"single_word": false,
|
| 395 |
-
"special": true
|
| 396 |
-
},
|
| 397 |
-
"100305": {
|
| 398 |
-
"content": "<|unused_36|>",
|
| 399 |
-
"lstrip": false,
|
| 400 |
-
"normalized": false,
|
| 401 |
-
"rstrip": false,
|
| 402 |
-
"single_word": false,
|
| 403 |
-
"special": true
|
| 404 |
-
},
|
| 405 |
-
"100306": {
|
| 406 |
-
"content": "<|unused_37|>",
|
| 407 |
-
"lstrip": false,
|
| 408 |
-
"normalized": false,
|
| 409 |
-
"rstrip": false,
|
| 410 |
-
"single_word": false,
|
| 411 |
-
"special": true
|
| 412 |
-
},
|
| 413 |
-
"100307": {
|
| 414 |
-
"content": "<|unused_38|>",
|
| 415 |
-
"lstrip": false,
|
| 416 |
-
"normalized": false,
|
| 417 |
-
"rstrip": false,
|
| 418 |
-
"single_word": false,
|
| 419 |
-
"special": true
|
| 420 |
-
},
|
| 421 |
-
"100308": {
|
| 422 |
-
"content": "<|unused_39|>",
|
| 423 |
-
"lstrip": false,
|
| 424 |
-
"normalized": false,
|
| 425 |
-
"rstrip": false,
|
| 426 |
-
"single_word": false,
|
| 427 |
-
"special": true
|
| 428 |
-
},
|
| 429 |
-
"100309": {
|
| 430 |
-
"content": "<|unused_40|>",
|
| 431 |
-
"lstrip": false,
|
| 432 |
-
"normalized": false,
|
| 433 |
-
"rstrip": false,
|
| 434 |
-
"single_word": false,
|
| 435 |
-
"special": true
|
| 436 |
-
},
|
| 437 |
-
"100310": {
|
| 438 |
-
"content": "<|unused_41|>",
|
| 439 |
-
"lstrip": false,
|
| 440 |
-
"normalized": false,
|
| 441 |
-
"rstrip": false,
|
| 442 |
-
"single_word": false,
|
| 443 |
-
"special": true
|
| 444 |
-
},
|
| 445 |
-
"100311": {
|
| 446 |
-
"content": "<|unused_42|>",
|
| 447 |
-
"lstrip": false,
|
| 448 |
-
"normalized": false,
|
| 449 |
-
"rstrip": false,
|
| 450 |
-
"single_word": false,
|
| 451 |
-
"special": true
|
| 452 |
-
},
|
| 453 |
-
"100312": {
|
| 454 |
-
"content": "<|unused_43|>",
|
| 455 |
-
"lstrip": false,
|
| 456 |
-
"normalized": false,
|
| 457 |
-
"rstrip": false,
|
| 458 |
-
"single_word": false,
|
| 459 |
-
"special": true
|
| 460 |
-
},
|
| 461 |
-
"100313": {
|
| 462 |
-
"content": "<|unused_44|>",
|
| 463 |
-
"lstrip": false,
|
| 464 |
-
"normalized": false,
|
| 465 |
-
"rstrip": false,
|
| 466 |
-
"single_word": false,
|
| 467 |
-
"special": true
|
| 468 |
-
},
|
| 469 |
-
"100314": {
|
| 470 |
-
"content": "<|unused_45|>",
|
| 471 |
-
"lstrip": false,
|
| 472 |
-
"normalized": false,
|
| 473 |
-
"rstrip": false,
|
| 474 |
-
"single_word": false,
|
| 475 |
-
"special": true
|
| 476 |
-
},
|
| 477 |
-
"100315": {
|
| 478 |
-
"content": "<|unused_46|>",
|
| 479 |
-
"lstrip": false,
|
| 480 |
-
"normalized": false,
|
| 481 |
-
"rstrip": false,
|
| 482 |
-
"single_word": false,
|
| 483 |
-
"special": true
|
| 484 |
-
},
|
| 485 |
-
"100316": {
|
| 486 |
-
"content": "<|unused_47|>",
|
| 487 |
-
"lstrip": false,
|
| 488 |
-
"normalized": false,
|
| 489 |
-
"rstrip": false,
|
| 490 |
-
"single_word": false,
|
| 491 |
-
"special": true
|
| 492 |
-
},
|
| 493 |
-
"100317": {
|
| 494 |
-
"content": "<|unused_48|>",
|
| 495 |
-
"lstrip": false,
|
| 496 |
-
"normalized": false,
|
| 497 |
-
"rstrip": false,
|
| 498 |
-
"single_word": false,
|
| 499 |
-
"special": true
|
| 500 |
-
},
|
| 501 |
-
"100318": {
|
| 502 |
-
"content": "<|unused_49|>",
|
| 503 |
-
"lstrip": false,
|
| 504 |
-
"normalized": false,
|
| 505 |
-
"rstrip": false,
|
| 506 |
-
"single_word": false,
|
| 507 |
-
"special": true
|
| 508 |
-
},
|
| 509 |
-
"100319": {
|
| 510 |
-
"content": "<|unused_50|>",
|
| 511 |
-
"lstrip": false,
|
| 512 |
-
"normalized": false,
|
| 513 |
-
"rstrip": false,
|
| 514 |
-
"single_word": false,
|
| 515 |
-
"special": true
|
| 516 |
-
},
|
| 517 |
-
"100320": {
|
| 518 |
-
"content": "<|unused_51|>",
|
| 519 |
-
"lstrip": false,
|
| 520 |
-
"normalized": false,
|
| 521 |
-
"rstrip": false,
|
| 522 |
-
"single_word": false,
|
| 523 |
-
"special": true
|
| 524 |
-
},
|
| 525 |
-
"100321": {
|
| 526 |
-
"content": "<|unused_52|>",
|
| 527 |
-
"lstrip": false,
|
| 528 |
-
"normalized": false,
|
| 529 |
-
"rstrip": false,
|
| 530 |
-
"single_word": false,
|
| 531 |
-
"special": true
|
| 532 |
-
},
|
| 533 |
-
"100322": {
|
| 534 |
-
"content": "<|unused_53|>",
|
| 535 |
-
"lstrip": false,
|
| 536 |
-
"normalized": false,
|
| 537 |
-
"rstrip": false,
|
| 538 |
-
"single_word": false,
|
| 539 |
-
"special": true
|
| 540 |
-
},
|
| 541 |
-
"100323": {
|
| 542 |
-
"content": "<|unused_54|>",
|
| 543 |
-
"lstrip": false,
|
| 544 |
-
"normalized": false,
|
| 545 |
-
"rstrip": false,
|
| 546 |
-
"single_word": false,
|
| 547 |
-
"special": true
|
| 548 |
-
},
|
| 549 |
-
"100324": {
|
| 550 |
-
"content": "<|unused_55|>",
|
| 551 |
-
"lstrip": false,
|
| 552 |
-
"normalized": false,
|
| 553 |
-
"rstrip": false,
|
| 554 |
-
"single_word": false,
|
| 555 |
-
"special": true
|
| 556 |
-
},
|
| 557 |
-
"100325": {
|
| 558 |
-
"content": "<|unused_56|>",
|
| 559 |
-
"lstrip": false,
|
| 560 |
-
"normalized": false,
|
| 561 |
-
"rstrip": false,
|
| 562 |
-
"single_word": false,
|
| 563 |
-
"special": true
|
| 564 |
-
},
|
| 565 |
-
"100326": {
|
| 566 |
-
"content": "<|unused_57|>",
|
| 567 |
-
"lstrip": false,
|
| 568 |
-
"normalized": false,
|
| 569 |
-
"rstrip": false,
|
| 570 |
-
"single_word": false,
|
| 571 |
-
"special": true
|
| 572 |
-
},
|
| 573 |
-
"100327": {
|
| 574 |
-
"content": "<|unused_58|>",
|
| 575 |
-
"lstrip": false,
|
| 576 |
-
"normalized": false,
|
| 577 |
-
"rstrip": false,
|
| 578 |
-
"single_word": false,
|
| 579 |
-
"special": true
|
| 580 |
-
},
|
| 581 |
-
"100328": {
|
| 582 |
-
"content": "<|unused_59|>",
|
| 583 |
-
"lstrip": false,
|
| 584 |
-
"normalized": false,
|
| 585 |
-
"rstrip": false,
|
| 586 |
-
"single_word": false,
|
| 587 |
-
"special": true
|
| 588 |
-
},
|
| 589 |
-
"100329": {
|
| 590 |
-
"content": "<|unused_60|>",
|
| 591 |
-
"lstrip": false,
|
| 592 |
-
"normalized": false,
|
| 593 |
-
"rstrip": false,
|
| 594 |
-
"single_word": false,
|
| 595 |
-
"special": true
|
| 596 |
-
},
|
| 597 |
-
"100330": {
|
| 598 |
-
"content": "<|unused_61|>",
|
| 599 |
-
"lstrip": false,
|
| 600 |
-
"normalized": false,
|
| 601 |
-
"rstrip": false,
|
| 602 |
-
"single_word": false,
|
| 603 |
-
"special": true
|
| 604 |
-
},
|
| 605 |
-
"100331": {
|
| 606 |
-
"content": "<|unused_62|>",
|
| 607 |
-
"lstrip": false,
|
| 608 |
-
"normalized": false,
|
| 609 |
-
"rstrip": false,
|
| 610 |
-
"single_word": false,
|
| 611 |
-
"special": true
|
| 612 |
-
},
|
| 613 |
-
"100332": {
|
| 614 |
-
"content": "<|unused_63|>",
|
| 615 |
-
"lstrip": false,
|
| 616 |
-
"normalized": false,
|
| 617 |
-
"rstrip": false,
|
| 618 |
-
"single_word": false,
|
| 619 |
-
"special": true
|
| 620 |
-
},
|
| 621 |
-
"100333": {
|
| 622 |
-
"content": "<|unused_64|>",
|
| 623 |
-
"lstrip": false,
|
| 624 |
-
"normalized": false,
|
| 625 |
-
"rstrip": false,
|
| 626 |
-
"single_word": false,
|
| 627 |
-
"special": true
|
| 628 |
-
},
|
| 629 |
-
"100334": {
|
| 630 |
-
"content": "<|unused_65|>",
|
| 631 |
-
"lstrip": false,
|
| 632 |
-
"normalized": false,
|
| 633 |
-
"rstrip": false,
|
| 634 |
-
"single_word": false,
|
| 635 |
-
"special": true
|
| 636 |
-
},
|
| 637 |
-
"100335": {
|
| 638 |
-
"content": "<|unused_66|>",
|
| 639 |
-
"lstrip": false,
|
| 640 |
-
"normalized": false,
|
| 641 |
-
"rstrip": false,
|
| 642 |
-
"single_word": false,
|
| 643 |
-
"special": true
|
| 644 |
-
},
|
| 645 |
-
"100336": {
|
| 646 |
-
"content": "<|unused_67|>",
|
| 647 |
-
"lstrip": false,
|
| 648 |
-
"normalized": false,
|
| 649 |
-
"rstrip": false,
|
| 650 |
-
"single_word": false,
|
| 651 |
-
"special": true
|
| 652 |
-
},
|
| 653 |
-
"100337": {
|
| 654 |
-
"content": "<|unused_68|>",
|
| 655 |
-
"lstrip": false,
|
| 656 |
-
"normalized": false,
|
| 657 |
-
"rstrip": false,
|
| 658 |
-
"single_word": false,
|
| 659 |
-
"special": true
|
| 660 |
-
},
|
| 661 |
-
"100338": {
|
| 662 |
-
"content": "<|unused_69|>",
|
| 663 |
-
"lstrip": false,
|
| 664 |
-
"normalized": false,
|
| 665 |
-
"rstrip": false,
|
| 666 |
-
"single_word": false,
|
| 667 |
-
"special": true
|
| 668 |
-
},
|
| 669 |
-
"100339": {
|
| 670 |
-
"content": "<|unused_70|>",
|
| 671 |
-
"lstrip": false,
|
| 672 |
-
"normalized": false,
|
| 673 |
-
"rstrip": false,
|
| 674 |
-
"single_word": false,
|
| 675 |
-
"special": true
|
| 676 |
-
},
|
| 677 |
-
"100340": {
|
| 678 |
-
"content": "<|unused_71|>",
|
| 679 |
-
"lstrip": false,
|
| 680 |
-
"normalized": false,
|
| 681 |
-
"rstrip": false,
|
| 682 |
-
"single_word": false,
|
| 683 |
-
"special": true
|
| 684 |
-
},
|
| 685 |
-
"100341": {
|
| 686 |
-
"content": "<|unused_72|>",
|
| 687 |
-
"lstrip": false,
|
| 688 |
-
"normalized": false,
|
| 689 |
-
"rstrip": false,
|
| 690 |
-
"single_word": false,
|
| 691 |
-
"special": true
|
| 692 |
-
},
|
| 693 |
-
"100342": {
|
| 694 |
-
"content": "<|unused_73|>",
|
| 695 |
-
"lstrip": false,
|
| 696 |
-
"normalized": false,
|
| 697 |
-
"rstrip": false,
|
| 698 |
-
"single_word": false,
|
| 699 |
-
"special": true
|
| 700 |
-
},
|
| 701 |
-
"100343": {
|
| 702 |
-
"content": "<|unused_74|>",
|
| 703 |
-
"lstrip": false,
|
| 704 |
-
"normalized": false,
|
| 705 |
-
"rstrip": false,
|
| 706 |
-
"single_word": false,
|
| 707 |
-
"special": true
|
| 708 |
-
},
|
| 709 |
-
"100344": {
|
| 710 |
-
"content": "<|unused_75|>",
|
| 711 |
-
"lstrip": false,
|
| 712 |
-
"normalized": false,
|
| 713 |
-
"rstrip": false,
|
| 714 |
-
"single_word": false,
|
| 715 |
-
"special": true
|
| 716 |
-
},
|
| 717 |
-
"100345": {
|
| 718 |
-
"content": "<|unused_76|>",
|
| 719 |
-
"lstrip": false,
|
| 720 |
-
"normalized": false,
|
| 721 |
-
"rstrip": false,
|
| 722 |
-
"single_word": false,
|
| 723 |
-
"special": true
|
| 724 |
-
},
|
| 725 |
-
"100346": {
|
| 726 |
-
"content": "<|unused_77|>",
|
| 727 |
-
"lstrip": false,
|
| 728 |
-
"normalized": false,
|
| 729 |
-
"rstrip": false,
|
| 730 |
-
"single_word": false,
|
| 731 |
-
"special": true
|
| 732 |
-
},
|
| 733 |
-
"100347": {
|
| 734 |
-
"content": "<|unused_78|>",
|
| 735 |
-
"lstrip": false,
|
| 736 |
-
"normalized": false,
|
| 737 |
-
"rstrip": false,
|
| 738 |
-
"single_word": false,
|
| 739 |
-
"special": true
|
| 740 |
-
},
|
| 741 |
-
"100348": {
|
| 742 |
-
"content": "<|unused_79|>",
|
| 743 |
-
"lstrip": false,
|
| 744 |
-
"normalized": false,
|
| 745 |
-
"rstrip": false,
|
| 746 |
-
"single_word": false,
|
| 747 |
-
"special": true
|
| 748 |
-
},
|
| 749 |
-
"100349": {
|
| 750 |
-
"content": "<|unused_80|>",
|
| 751 |
-
"lstrip": false,
|
| 752 |
-
"normalized": false,
|
| 753 |
-
"rstrip": false,
|
| 754 |
-
"single_word": false,
|
| 755 |
-
"special": true
|
| 756 |
-
},
|
| 757 |
-
"100350": {
|
| 758 |
-
"content": "<|unused_81|>",
|
| 759 |
-
"lstrip": false,
|
| 760 |
-
"normalized": false,
|
| 761 |
-
"rstrip": false,
|
| 762 |
-
"single_word": false,
|
| 763 |
-
"special": true
|
| 764 |
-
},
|
| 765 |
-
"100351": {
|
| 766 |
-
"content": "<|unused_82|>",
|
| 767 |
-
"lstrip": false,
|
| 768 |
-
"normalized": false,
|
| 769 |
-
"rstrip": false,
|
| 770 |
-
"single_word": false,
|
| 771 |
-
"special": true
|
| 772 |
-
}
|
| 773 |
-
},
|
| 774 |
-
"bos_token": "<|end_of_text|>",
|
| 775 |
-
"clean_up_tokenization_spaces": false,
|
| 776 |
-
"eos_token": "<|end_of_text|>",
|
| 777 |
-
"extra_special_tokens": {},
|
| 778 |
-
"model_max_length": 1000000000000000019884624838656,
|
| 779 |
-
"pad_token": "<|pad|>",
|
| 780 |
-
"padding_side": "left",
|
| 781 |
-
"tokenizer_class": "GPT2Tokenizer",
|
| 782 |
-
"unk_token": "<|unk|>"
|
| 783 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/training_args.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c26d41c07db17c2c6957479b74865d8ac3dfb39a7b8901bdf05e890b8d65cf2a
|
| 3 |
-
size 6353
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite-4.0-micro/lora/vocab.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_classifier/granite4_micro/lora/Lora-q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:05ab02c60a86272867f2912a7e5be3938d66a2e1c21dd82dfb8101d9a3672a32
|
| 3 |
-
size 15335328
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite4_micro/lora/Modelfile
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
FROM granite4:micro
|
| 2 |
-
ADAPTER Lora-q8_0.gguf
|
|
|
|
|
|
|
|
|
answer_relevance_classifier/granite4_micro/lora/io.yaml
DELETED
|
@@ -1,50 +0,0 @@
|
|
| 1 |
-
model: null
|
| 2 |
-
response_format: null
|
| 3 |
-
instruction: answer_relevance
|
| 4 |
-
transformations:
|
| 5 |
-
- type: likelihood
|
| 6 |
-
categories_to_values:
|
| 7 |
-
true: 1.0
|
| 8 |
-
false: 0.0
|
| 9 |
-
input_path:
|
| 10 |
-
- answer_relevance_judgment
|
| 11 |
-
- type: project
|
| 12 |
-
input_path: []
|
| 13 |
-
retained_fields:
|
| 14 |
-
answer_relevance_analysis: answer_relevance_analysis
|
| 15 |
-
answer_relevance_category: answer_relevance_category
|
| 16 |
-
answer_relevance_judgment: answer_relevance_likelihood
|
| 17 |
-
parameters:
|
| 18 |
-
response_format:
|
| 19 |
-
type: json_schema
|
| 20 |
-
json_schema:
|
| 21 |
-
schema:
|
| 22 |
-
properties:
|
| 23 |
-
answer_relevance_analysis:
|
| 24 |
-
title: Answer Relevance Analysis
|
| 25 |
-
type: string
|
| 26 |
-
answer_relevance_category:
|
| 27 |
-
title: Answer Relevance Category
|
| 28 |
-
type: string
|
| 29 |
-
enum:
|
| 30 |
-
- Pertinent
|
| 31 |
-
- Pertinent with relevant extra
|
| 32 |
-
- Excessive unnecessary information
|
| 33 |
-
- Unduly restrictive
|
| 34 |
-
- Too vague or generic
|
| 35 |
-
- Contextual misalignment
|
| 36 |
-
- Misinterpreted inquiry
|
| 37 |
-
- No attempt
|
| 38 |
-
answer_relevance_judgment:
|
| 39 |
-
title: Answer Relevance Judgment
|
| 40 |
-
type: boolean
|
| 41 |
-
required:
|
| 42 |
-
- answer_relevance_analysis
|
| 43 |
-
- answer_relevance_category
|
| 44 |
-
- answer_relevance_judgment
|
| 45 |
-
title: AnswerRelevanceRawOutput
|
| 46 |
-
type: object
|
| 47 |
-
strict: true
|
| 48 |
-
max_tokens: 1024
|
| 49 |
-
sentence_boundaries: null
|
| 50 |
-
docs_as_message: roles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/README.md
DELETED
|
@@ -1,157 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
pipeline_tag: text-generation
|
| 6 |
-
library_name: peft
|
| 7 |
-
library_name: transformers
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
# Intrinsics for Answer Relevance Rewriter
|
| 11 |
-
|
| 12 |
-
## Model Summary
|
| 13 |
-
This is a RAG-specific intrinsic for answer relevance rewrite task.
|
| 14 |
-
The model takes as input the chat completion from answer relevance classifier output
|
| 15 |
-
consisting of conversation as well as answer_relevance_classification, together with grounding documents,
|
| 16 |
-
and provides a rewritten assistant response that is more relevant to the user's final inquiry.
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
We provide two intrinsics implemented as LoRA adapters (LoRA/aLoRA) trained over
|
| 20 |
-
Granite-3.3-2b-instruct, Granite-3.3-8b-instruct.
|
| 21 |
-
|
| 22 |
-
- **Developer:** IBM Research
|
| 23 |
-
- **Model type:** LoRA and aLoRA adapter for
|
| 24 |
-
[ibm-granite/granite-3.3-2b-instruct](https://huggingface.co/ibm-granite/granite-3.3-2b-instruct),
|
| 25 |
-
[ibm-granite/granite-3.3-8b-instruct](https://huggingface.co/ibm-granite/granite-3.3-8b-instruct)
|
| 26 |
-
- **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
| 27 |
-
|
| 28 |
-
## Intended use
|
| 29 |
-
This rag specific intrinsics is intended to be used to post-process the generated assistant response.
|
| 30 |
-
It should be used following the answer relevance classifier intrinsic, and should be applied to
|
| 31 |
-
the cases where the `answer_relevance_likelihood` is below a certain threshold according to application criteria.
|
| 32 |
-
|
| 33 |
-
For cases where the assistant answer is deemed not relevant (where `answer_relevance_likelihood` is below a
|
| 34 |
-
given threshold), the answer relevance rewriter intrinsic can be used to rewrite the assistant response
|
| 35 |
-
into a more relevant response. It takes as input the chat completion
|
| 36 |
-
from answer relevance classifier output and the grounding documents. Its output is of the form
|
| 37 |
-
|
| 38 |
-
{
|
| 39 |
-
answer_relevance_rewrite: <Rewritten response>
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
The rewriter is instructed to only correct deficiencies in relevance as identified by the classifier,
|
| 43 |
-
and ensure the rewritten response is grounded in the conversation and given documents.
|
| 44 |
-
|
| 45 |
-
**Model input**: The input to the answer relevance rewriter intrinsic is an
|
| 46 |
-
OpenAI-compatible chat completion request, containing a list of conversation
|
| 47 |
-
turns that can alternate between the `user` and `assistant` role and ending with
|
| 48 |
-
a `assistant` turn, plus two additional turns:
|
| 49 |
-
- A conversation between user and assistant ending with assistant response
|
| 50 |
-
- An additional user turn with content "answer_relevance"
|
| 51 |
-
|
| 52 |
-
**Model output**: The output of the answer relevance rewriter intrinsic is the result of the
|
| 53 |
-
original chat completion request formatted as a JSON object of the following schema
|
| 54 |
-
|
| 55 |
-
{
|
| 56 |
-
answer_relevance_rewrite: <Rewritten response>
|
| 57 |
-
}
|
| 58 |
-
|
| 59 |
-
Please see the code snippets in the Quickstart Example section below for
|
| 60 |
-
examples that illustrate the intrinsic's input/output.
|
| 61 |
-
|
| 62 |
-
## Quickstart Example
|
| 63 |
-
|
| 64 |
-
The recommended way to call this intrinsic is through the [Mellea](https://mellea.ai) framework.
|
| 65 |
-
Here is some example code for calling this intrinsic from Mellea:
|
| 66 |
-
```
|
| 67 |
-
from mellea.backends.huggingface import LocalHFBackend
|
| 68 |
-
from mellea.stdlib.base import ChatContext, Document
|
| 69 |
-
from mellea.stdlib.chat import Message
|
| 70 |
-
from mellea.stdlib.intrinsics import rag
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
backend = LocalHFBackend(model_id="ibm-granite/granite-3.3-2b-instruct")
|
| 74 |
-
context = ChatContext().add(Message("user", "Who attended the meeting?"))
|
| 75 |
-
documents = [
|
| 76 |
-
Document("Meeting attendees: Alice, Bob, Carol."),
|
| 77 |
-
Document("Meeting time: 9:00 am to 11:00 am."),
|
| 78 |
-
]
|
| 79 |
-
original_result = "Many people attended the meeting."
|
| 80 |
-
|
| 81 |
-
print(f"Result before relevance intrinsic: {original_result}")
|
| 82 |
-
result = rag.rewrite_answer_for_relevance(original_result, documents, context, backend)
|
| 83 |
-
print(f"Result after relevance intrinsic: {result}")
|
| 84 |
-
```
|
| 85 |
-
|
| 86 |
-
## Training Details
|
| 87 |
-
|
| 88 |
-
### Training Data
|
| 89 |
-
|
| 90 |
-
The training data is created in the following process
|
| 91 |
-
1. Take the synthetic rag-data-granite dataset, consisting of conversations between user and assistant.
|
| 92 |
-
2. Replace the assistant response by running granite-3.2-intrinsics at temperature 1.0.
|
| 93 |
-
3. Produce answer_relevance_rewriter target output using mixtral-large with prompts with in-context examples.
|
| 94 |
-
The conversation created in steps 1 and 2 are taken as training input. The json string from step 3
|
| 95 |
-
is taken as train target output.
|
| 96 |
-
|
| 97 |
-
#### Training Hyperparameters
|
| 98 |
-
|
| 99 |
-
The LoRA adapter was fine-tuned using PEFT under the following regime: rank =
|
| 100 |
-
32, learning rate = 1.0e-04, number of epochs = 5.
|
| 101 |
-
|
| 102 |
-
## Evaluation
|
| 103 |
-
|
| 104 |
-
### Answer Relevance Rewriter
|
| 105 |
-
|
| 106 |
-
We evaluated the model on test data set generated by the same procedure as the training process,
|
| 107 |
-
using GPT-4o as judge.
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
The following table presents results comparing baselines and frontier models
|
| 111 |
-
on the answer relevance rewrite task. The data sets consists of those classified as irrelevant by
|
| 112 |
-
mixtral-large. The evaluations are first divided into two parts, those that are truly irrelevant,
|
| 113 |
-
for which we measure the rate of rewrite becoming relevant, and those that are false irrelevant,
|
| 114 |
-
for which we measure the rate of rewrite becoming irrelevant. Then the overall rate flipping
|
| 115 |
-
irrelevant to relevant and flipping relevant to irrelevant are calculated, and well as the net gain
|
| 116 |
-
of relevance and resulting final relevance.
|
| 117 |
-
|
| 118 |
-
The LoRAs out perform the best of frontier models
|
| 119 |
-
|
| 120 |
-
| | True irrelevant <br> flip to relevant | False irrelevant <br> flip to irrelevant| Overall <br> flip irrelevant <br> to relevant | Overall <br> flip relevant <br> to irrelevant| net gain | Result <br>relevance |
|
| 121 |
-
|:---------------------|:--------------|:---------|:------------------------------|:---------|:---------|:--------------|
|
| 122 |
-
| mixtral-8x22b-v0.1 | 0.416 | 0.101 | 0.286 | 0.032 | 0.254 | 0.566 |
|
| 123 |
-
| llama-3.3-70b | 0.804 | 0.041 | 0.554 | 0.013 | 0.541 | 0.853 |
|
| 124 |
-
| gpt-oss-20b | 0.902 | 0.034 | 0.621 | 0.011 | 0.610 | 0.922 |
|
| 125 |
-
| gpt-4o | 0.960 | 0.014 | 0.661 | 0.004 | 0.657 | 0.968 |
|
| 126 |
-
| gpt-4o-mini | 0.758 | 0.027 | 0.522 | 0.008 | 0.514 | 0.825 |
|
| 127 |
-
| | | | | | | |
|
| 128 |
-
| granite-3.3-2b/lora | 0.972 | 0.027 | 0.669 | 0.008 | 0.661 | 0.973 |
|
| 129 |
-
| granite-3.3-2b/alora | 0.972 | 0.007 | 0.669 | 0.002 | 0.667 | 0.979 |
|
| 130 |
-
| granite-3.3-8b/lora | 0.969 | 0.014 | 0.667 | 0.004 | 0.663 | 0.975 |
|
| 131 |
-
| granite-3.3-8b/alora | 0.966 | 0.027 | 0.665 | 0.008 | 0.657 | 0.968 |
|
| 132 |
-
| | | | | | | |
|
| 133 |
-
|
| 134 |
-
### Comparing the Answer Relevance Rewriter Intrinsics vs. Vanilla Granite Models
|
| 135 |
-
|
| 136 |
-
We compare the performance of Granite 3.3-2b, Granite 3.3-8b Instruct
|
| 137 |
-
vs. answer relevance rewriter intrinsics implemented as LoRA adapters.
|
| 138 |
-
It is seen that the LoRAs significantly out perform the base models.
|
| 139 |
-
| | True irrelevant <br> flip to relevant | False irrelevant <br> flip to irrelevant| Overall <br> flip irrelevant <br> to relevant | Overall <br> flip relevant <br> to irrelevant| net gain | Result relevance |
|
| 140 |
-
|:---------------------|:--------------|:---------|:------------------------------|:---------|:---------|:--------------|
|
| 141 |
-
| granite-3.3-2b | 0.346 | 0.169 | 0.238 | 0.053 | 0.185 | 0.497 |
|
| 142 |
-
| granite-3.3-2b/lora | 0.972 | 0.027 | 0.669 | 0.008 | 0.661 | 0.973 |
|
| 143 |
-
| granite-3.3-2b/alora | 0.972 | 0.007 | 0.669 | 0.002 | 0.667 | 0.979 |
|
| 144 |
-
| | | | | | | |
|
| 145 |
-
| granite-3.3-8b | 0.266 | 0.277 | 0.183 | 0.086 | 0.097 | 0.408 |
|
| 146 |
-
| granite-3.3-8b/lora | 0.969 | 0.014 | 0.667 | 0.004 | 0.663 | 0.975 |
|
| 147 |
-
| granite-3.3-8b/alora | 0.966 | 0.027 | 0.665 | 0.008 | 0.657 | 0.968 |
|
| 148 |
-
| | | | | | | |
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
## Model Card Authors
|
| 152 |
-
|
| 153 |
-
[Huaiyu Zhu](mailto:huaiyu@us.ibm.com)
|
| 154 |
-
|
| 155 |
-
### Framework versions
|
| 156 |
-
|
| 157 |
-
- PEFT 0.14.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/adapter_config.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alpha_pattern": {},
|
| 3 |
-
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "ibm-granite/granite-3.3-8b-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.05,
|
| 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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/adapter_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:4ae2de12b4b4b123cb14088257b9689124265916a51a911d05ed115e2603446b
|
| 3 |
-
size 94404160
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/added_tokens.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"<|end_of_cite|>": 49156,
|
| 3 |
-
"<|end_of_plugin|>": 49158,
|
| 4 |
-
"<|end_of_role|>": 49153,
|
| 5 |
-
"<|start_of_cite|>": 49155,
|
| 6 |
-
"<|start_of_plugin|>": 49157,
|
| 7 |
-
"<|start_of_role|>": 49152,
|
| 8 |
-
"<|tool_call|>": 49154
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/io.yaml
DELETED
|
@@ -1,29 +0,0 @@
|
|
| 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, or null if constrained decoding is not needed
|
| 4 |
-
response_format: |
|
| 5 |
-
{
|
| 6 |
-
"properties": {
|
| 7 |
-
"answer_relevance_rewrite": {
|
| 8 |
-
"title": "Rewritten answer",
|
| 9 |
-
"type": "string"
|
| 10 |
-
}
|
| 11 |
-
},
|
| 12 |
-
"required": [
|
| 13 |
-
"answer_relevance_rewrite"
|
| 14 |
-
],
|
| 15 |
-
"type": "object"
|
| 16 |
-
}
|
| 17 |
-
# Additional turn of instructions to add to the chat
|
| 18 |
-
instruction: |
|
| 19 |
-
Rewrite the response for relevance.
|
| 20 |
-
The last assistant response is considered not fully relevant to the last user inquiry due to {answer_relevance_category}: {answer_relevance_analysis}
|
| 21 |
-
Decide if you agree with this assessment, then act according to the following instructions:
|
| 22 |
-
If you disagree with the assessment, provide a verbatim copy of the original response. DO NOT attempt to correct any other perceived defects in the response.
|
| 23 |
-
If you agree with the assessment, provide an updated response that no longer fit the label {answer_relevance_category}, by {correction_method}. Your response should be entirely based on the provided documents and should not rely on other prior knowledge. Your response should be suitable to be directly provided to the user. It should NOT contain meta information regarding the original response, its assessment, or this instruction. The user does not see any of these. Your response is the only response they will see to their inquiry, in place of the original response.
|
| 24 |
-
# Data transformations to perform during post-processing
|
| 25 |
-
transformations: ~
|
| 26 |
-
parameters:
|
| 27 |
-
# Rewritten response could be long.
|
| 28 |
-
max_completion_tokens: 1024
|
| 29 |
-
sentence_boundaries: ~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/merges.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/special_tokens_map.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"<|start_of_role|>",
|
| 4 |
-
"<|end_of_role|>",
|
| 5 |
-
"<|tool_call|>",
|
| 6 |
-
"<|start_of_cite|>",
|
| 7 |
-
"<|end_of_cite|>",
|
| 8 |
-
"<|start_of_plugin|>",
|
| 9 |
-
"<|end_of_plugin|>"
|
| 10 |
-
],
|
| 11 |
-
"bos_token": {
|
| 12 |
-
"content": "<|end_of_text|>",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false
|
| 17 |
-
},
|
| 18 |
-
"eos_token": {
|
| 19 |
-
"content": "<|end_of_text|>",
|
| 20 |
-
"lstrip": false,
|
| 21 |
-
"normalized": false,
|
| 22 |
-
"rstrip": false,
|
| 23 |
-
"single_word": false
|
| 24 |
-
},
|
| 25 |
-
"pad_token": {
|
| 26 |
-
"content": "<|end_of_text|>",
|
| 27 |
-
"lstrip": false,
|
| 28 |
-
"normalized": false,
|
| 29 |
-
"rstrip": false,
|
| 30 |
-
"single_word": false
|
| 31 |
-
},
|
| 32 |
-
"unk_token": {
|
| 33 |
-
"content": "<|end_of_text|>",
|
| 34 |
-
"lstrip": false,
|
| 35 |
-
"normalized": false,
|
| 36 |
-
"rstrip": false,
|
| 37 |
-
"single_word": false
|
| 38 |
-
}
|
| 39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/tokenizer_config.json
DELETED
|
@@ -1,235 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": false,
|
| 3 |
-
"add_prefix_space": false,
|
| 4 |
-
"added_tokens_decoder": {
|
| 5 |
-
"0": {
|
| 6 |
-
"content": "<|end_of_text|>",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": false,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false,
|
| 11 |
-
"special": true
|
| 12 |
-
},
|
| 13 |
-
"1": {
|
| 14 |
-
"content": "<fim_prefix>",
|
| 15 |
-
"lstrip": false,
|
| 16 |
-
"normalized": false,
|
| 17 |
-
"rstrip": false,
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"special": true
|
| 20 |
-
},
|
| 21 |
-
"2": {
|
| 22 |
-
"content": "<fim_middle>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": false,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false,
|
| 27 |
-
"special": true
|
| 28 |
-
},
|
| 29 |
-
"3": {
|
| 30 |
-
"content": "<fim_suffix>",
|
| 31 |
-
"lstrip": false,
|
| 32 |
-
"normalized": false,
|
| 33 |
-
"rstrip": false,
|
| 34 |
-
"single_word": false,
|
| 35 |
-
"special": true
|
| 36 |
-
},
|
| 37 |
-
"4": {
|
| 38 |
-
"content": "<fim_pad>",
|
| 39 |
-
"lstrip": false,
|
| 40 |
-
"normalized": false,
|
| 41 |
-
"rstrip": false,
|
| 42 |
-
"single_word": false,
|
| 43 |
-
"special": true
|
| 44 |
-
},
|
| 45 |
-
"5": {
|
| 46 |
-
"content": "<filename>",
|
| 47 |
-
"lstrip": false,
|
| 48 |
-
"normalized": false,
|
| 49 |
-
"rstrip": false,
|
| 50 |
-
"single_word": false,
|
| 51 |
-
"special": true
|
| 52 |
-
},
|
| 53 |
-
"6": {
|
| 54 |
-
"content": "<gh_stars>",
|
| 55 |
-
"lstrip": false,
|
| 56 |
-
"normalized": false,
|
| 57 |
-
"rstrip": false,
|
| 58 |
-
"single_word": false,
|
| 59 |
-
"special": true
|
| 60 |
-
},
|
| 61 |
-
"7": {
|
| 62 |
-
"content": "<issue_start>",
|
| 63 |
-
"lstrip": false,
|
| 64 |
-
"normalized": false,
|
| 65 |
-
"rstrip": false,
|
| 66 |
-
"single_word": false,
|
| 67 |
-
"special": true
|
| 68 |
-
},
|
| 69 |
-
"8": {
|
| 70 |
-
"content": "<issue_comment>",
|
| 71 |
-
"lstrip": false,
|
| 72 |
-
"normalized": false,
|
| 73 |
-
"rstrip": false,
|
| 74 |
-
"single_word": false,
|
| 75 |
-
"special": true
|
| 76 |
-
},
|
| 77 |
-
"9": {
|
| 78 |
-
"content": "<issue_closed>",
|
| 79 |
-
"lstrip": false,
|
| 80 |
-
"normalized": false,
|
| 81 |
-
"rstrip": false,
|
| 82 |
-
"single_word": false,
|
| 83 |
-
"special": true
|
| 84 |
-
},
|
| 85 |
-
"10": {
|
| 86 |
-
"content": "<jupyter_start>",
|
| 87 |
-
"lstrip": false,
|
| 88 |
-
"normalized": false,
|
| 89 |
-
"rstrip": false,
|
| 90 |
-
"single_word": false,
|
| 91 |
-
"special": true
|
| 92 |
-
},
|
| 93 |
-
"11": {
|
| 94 |
-
"content": "<jupyter_text>",
|
| 95 |
-
"lstrip": false,
|
| 96 |
-
"normalized": false,
|
| 97 |
-
"rstrip": false,
|
| 98 |
-
"single_word": false,
|
| 99 |
-
"special": true
|
| 100 |
-
},
|
| 101 |
-
"12": {
|
| 102 |
-
"content": "<jupyter_code>",
|
| 103 |
-
"lstrip": false,
|
| 104 |
-
"normalized": false,
|
| 105 |
-
"rstrip": false,
|
| 106 |
-
"single_word": false,
|
| 107 |
-
"special": true
|
| 108 |
-
},
|
| 109 |
-
"13": {
|
| 110 |
-
"content": "<jupyter_output>",
|
| 111 |
-
"lstrip": false,
|
| 112 |
-
"normalized": false,
|
| 113 |
-
"rstrip": false,
|
| 114 |
-
"single_word": false,
|
| 115 |
-
"special": true
|
| 116 |
-
},
|
| 117 |
-
"14": {
|
| 118 |
-
"content": "<empty_output>",
|
| 119 |
-
"lstrip": false,
|
| 120 |
-
"normalized": false,
|
| 121 |
-
"rstrip": false,
|
| 122 |
-
"single_word": false,
|
| 123 |
-
"special": true
|
| 124 |
-
},
|
| 125 |
-
"15": {
|
| 126 |
-
"content": "<commit_before>",
|
| 127 |
-
"lstrip": false,
|
| 128 |
-
"normalized": false,
|
| 129 |
-
"rstrip": false,
|
| 130 |
-
"single_word": false,
|
| 131 |
-
"special": true
|
| 132 |
-
},
|
| 133 |
-
"16": {
|
| 134 |
-
"content": "<commit_msg>",
|
| 135 |
-
"lstrip": false,
|
| 136 |
-
"normalized": false,
|
| 137 |
-
"rstrip": false,
|
| 138 |
-
"single_word": false,
|
| 139 |
-
"special": true
|
| 140 |
-
},
|
| 141 |
-
"17": {
|
| 142 |
-
"content": "<commit_after>",
|
| 143 |
-
"lstrip": false,
|
| 144 |
-
"normalized": false,
|
| 145 |
-
"rstrip": false,
|
| 146 |
-
"single_word": false,
|
| 147 |
-
"special": true
|
| 148 |
-
},
|
| 149 |
-
"18": {
|
| 150 |
-
"content": "<reponame>",
|
| 151 |
-
"lstrip": false,
|
| 152 |
-
"normalized": false,
|
| 153 |
-
"rstrip": false,
|
| 154 |
-
"single_word": false,
|
| 155 |
-
"special": true
|
| 156 |
-
},
|
| 157 |
-
"49152": {
|
| 158 |
-
"content": "<|start_of_role|>",
|
| 159 |
-
"lstrip": false,
|
| 160 |
-
"normalized": false,
|
| 161 |
-
"rstrip": false,
|
| 162 |
-
"single_word": false,
|
| 163 |
-
"special": true
|
| 164 |
-
},
|
| 165 |
-
"49153": {
|
| 166 |
-
"content": "<|end_of_role|>",
|
| 167 |
-
"lstrip": false,
|
| 168 |
-
"normalized": false,
|
| 169 |
-
"rstrip": false,
|
| 170 |
-
"single_word": false,
|
| 171 |
-
"special": true
|
| 172 |
-
},
|
| 173 |
-
"49154": {
|
| 174 |
-
"content": "<|tool_call|>",
|
| 175 |
-
"lstrip": false,
|
| 176 |
-
"normalized": false,
|
| 177 |
-
"rstrip": false,
|
| 178 |
-
"single_word": false,
|
| 179 |
-
"special": true
|
| 180 |
-
},
|
| 181 |
-
"49155": {
|
| 182 |
-
"content": "<|start_of_cite|>",
|
| 183 |
-
"lstrip": false,
|
| 184 |
-
"normalized": false,
|
| 185 |
-
"rstrip": false,
|
| 186 |
-
"single_word": false,
|
| 187 |
-
"special": true
|
| 188 |
-
},
|
| 189 |
-
"49156": {
|
| 190 |
-
"content": "<|end_of_cite|>",
|
| 191 |
-
"lstrip": false,
|
| 192 |
-
"normalized": false,
|
| 193 |
-
"rstrip": false,
|
| 194 |
-
"single_word": false,
|
| 195 |
-
"special": true
|
| 196 |
-
},
|
| 197 |
-
"49157": {
|
| 198 |
-
"content": "<|start_of_plugin|>",
|
| 199 |
-
"lstrip": false,
|
| 200 |
-
"normalized": false,
|
| 201 |
-
"rstrip": false,
|
| 202 |
-
"single_word": false,
|
| 203 |
-
"special": true
|
| 204 |
-
},
|
| 205 |
-
"49158": {
|
| 206 |
-
"content": "<|end_of_plugin|>",
|
| 207 |
-
"lstrip": false,
|
| 208 |
-
"normalized": false,
|
| 209 |
-
"rstrip": false,
|
| 210 |
-
"single_word": false,
|
| 211 |
-
"special": true
|
| 212 |
-
}
|
| 213 |
-
},
|
| 214 |
-
"additional_special_tokens": [
|
| 215 |
-
"<|start_of_role|>",
|
| 216 |
-
"<|end_of_role|>",
|
| 217 |
-
"<|tool_call|>",
|
| 218 |
-
"<|start_of_cite|>",
|
| 219 |
-
"<|end_of_cite|>",
|
| 220 |
-
"<|start_of_plugin|>",
|
| 221 |
-
"<|end_of_plugin|>"
|
| 222 |
-
],
|
| 223 |
-
"bos_token": "<|end_of_text|>",
|
| 224 |
-
"chat_template": "{# Alias tools -> available_tools #}\n{%- if tools and not available_tools -%}\n {%- set available_tools = tools -%}\n{%- endif -%}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n {%- else %}\n {%- set system_message = \"Knowledge Cutoff Date: April 2024.\nToday's Date: \" + strftime_now('%B %d, %Y') + \".\nYou are Granite, developed by IBM.\" %}\n {%- if available_tools and documents %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\nWrite the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif available_tools %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\" %}\n {%- elif documents %}\n {%- set system_message = system_message + \" Write the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif thinking %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\nRespond to every user query in a comprehensive and detailed way. You can write down your thoughts and reasoning process before responding. In the thought process, engage in a comprehensive cycle of analysis, summarization, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. In the response section, based on various attempts, explorations, and reflections from the thoughts section, systematically present the final solution that you deem correct. The response should summarize the thought process. Write your thoughts between <think></think> and write your response between <response></response> for each user query.\" %}\n {%- else %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\" %}\n {%- endif %}\n {%- if 'citations' in controls and documents %}\n {%- set system_message = system_message + '\nUse the symbols <|start_of_cite|> and <|end_of_cite|> to indicate when a fact comes from a document in the search result, e.g <|start_of_cite|> {document_id: 1}my fact <|end_of_cite|> for a fact from document 1. Afterwards, list all the citations with their corresponding documents in an ordered list.' %}\n {%- endif %}\n {%- if 'hallucinations' in controls and documents %}\n {%- set system_message = system_message + '\nFinally, after the response is written, include a numbered list of sentences from the response with a corresponding risk value that are hallucinated and not based in the documents.' %}\n {%- endif %}\n {%- set loop_messages = messages %}\n {%- endif %}\n {{- '<|start_of_role|>system<|end_of_role|>' + system_message + '<|end_of_text|>\n' }}\n {%- if available_tools %}\n {{- '<|start_of_role|>available_tools<|end_of_role|>' }}\n {{- available_tools | tojson(indent=4) }}\n {{- '<|end_of_text|>\n' }}\n {%- endif %}\n {%- if documents %}\n {%- for document in documents %}\n {{- '<|start_of_role|>document {\"document_id\": \"' + document['doc_id'] | string + '\"}<|end_of_role|>\n' }}\n {{- document['text'] }}\n {{- '<|end_of_text|>\n' }}\n {%- endfor %}\n {%- endif %}\n {%- for message in loop_messages %}\n {{- '<|start_of_role|>' + message['role'] + '<|end_of_role|>' + message['content'] + '<|end_of_text|>\n' }}\n {%- if loop.last and add_generation_prompt %}\n {{- '<|start_of_role|>assistant' }}\n {%- if controls %}\n {{- ' ' + controls | tojson()}}\n {%- endif %}\n {{- '<|end_of_role|>' }}\n {%- endif %}\n {%- endfor %}",
|
| 225 |
-
"clean_up_tokenization_spaces": true,
|
| 226 |
-
"eos_token": "<|end_of_text|>",
|
| 227 |
-
"errors": "replace",
|
| 228 |
-
"extra_special_tokens": {},
|
| 229 |
-
"model_max_length": 9223372036854775807,
|
| 230 |
-
"pad_token": "<|end_of_text|>",
|
| 231 |
-
"padding_side": "left",
|
| 232 |
-
"tokenizer_class": "GPT2Tokenizer",
|
| 233 |
-
"unk_token": "<|end_of_text|>",
|
| 234 |
-
"vocab_size": 49152
|
| 235 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/alora/vocab.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/adapter_config.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alpha_pattern": {},
|
| 3 |
-
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "ibm-granite/granite-3.3-8b-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.05,
|
| 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 |
-
"k_proj",
|
| 28 |
-
"v_proj"
|
| 29 |
-
],
|
| 30 |
-
"task_type": "CAUSAL_LM",
|
| 31 |
-
"use_dora": false,
|
| 32 |
-
"use_rslora": false
|
| 33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/adapter_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:74db6518798528a2cb2ecd620825a95db228c54a87393e88a5832218e77044ce
|
| 3 |
-
size 94404160
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/added_tokens.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"<|end_of_cite|>": 49156,
|
| 3 |
-
"<|end_of_plugin|>": 49158,
|
| 4 |
-
"<|end_of_role|>": 49153,
|
| 5 |
-
"<|start_of_cite|>": 49155,
|
| 6 |
-
"<|start_of_plugin|>": 49157,
|
| 7 |
-
"<|start_of_role|>": 49152,
|
| 8 |
-
"<|tool_call|>": 49154
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/io.yaml
DELETED
|
@@ -1,29 +0,0 @@
|
|
| 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, or null if constrained decoding is not needed
|
| 4 |
-
response_format: |
|
| 5 |
-
{
|
| 6 |
-
"properties": {
|
| 7 |
-
"answer_relevance_rewrite": {
|
| 8 |
-
"title": "Rewritten answer",
|
| 9 |
-
"type": "string"
|
| 10 |
-
}
|
| 11 |
-
},
|
| 12 |
-
"required": [
|
| 13 |
-
"answer_relevance_rewrite"
|
| 14 |
-
],
|
| 15 |
-
"type": "object"
|
| 16 |
-
}
|
| 17 |
-
# Additional turn of instructions to add to the chat
|
| 18 |
-
instruction: |
|
| 19 |
-
Rewrite the response for relevance.
|
| 20 |
-
The last assistant response is considered not fully relevant to the last user inquiry due to {answer_relevance_category}: {answer_relevance_analysis}
|
| 21 |
-
Decide if you agree with this assessment, then act according to the following instructions:
|
| 22 |
-
If you disagree with the assessment, provide a verbatim copy of the original response. DO NOT attempt to correct any other perceived defects in the response.
|
| 23 |
-
If you agree with the assessment, provide an updated response that no longer fit the label {answer_relevance_category}, by {correction_method}. Your response should be entirely based on the provided documents and should not rely on other prior knowledge. Your response should be suitable to be directly provided to the user. It should NOT contain meta information regarding the original response, its assessment, or this instruction. The user does not see any of these. Your response is the only response they will see to their inquiry, in place of the original response.
|
| 24 |
-
# Data transformations to perform during post-processing
|
| 25 |
-
transformations: ~
|
| 26 |
-
parameters:
|
| 27 |
-
# Rewritten response could be long.
|
| 28 |
-
max_completion_tokens: 1024
|
| 29 |
-
sentence_boundaries: ~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/merges.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/special_tokens_map.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"<|start_of_role|>",
|
| 4 |
-
"<|end_of_role|>",
|
| 5 |
-
"<|tool_call|>",
|
| 6 |
-
"<|start_of_cite|>",
|
| 7 |
-
"<|end_of_cite|>",
|
| 8 |
-
"<|start_of_plugin|>",
|
| 9 |
-
"<|end_of_plugin|>"
|
| 10 |
-
],
|
| 11 |
-
"bos_token": {
|
| 12 |
-
"content": "<|end_of_text|>",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false
|
| 17 |
-
},
|
| 18 |
-
"eos_token": {
|
| 19 |
-
"content": "<|end_of_text|>",
|
| 20 |
-
"lstrip": false,
|
| 21 |
-
"normalized": false,
|
| 22 |
-
"rstrip": false,
|
| 23 |
-
"single_word": false
|
| 24 |
-
},
|
| 25 |
-
"pad_token": {
|
| 26 |
-
"content": "<|end_of_text|>",
|
| 27 |
-
"lstrip": false,
|
| 28 |
-
"normalized": false,
|
| 29 |
-
"rstrip": false,
|
| 30 |
-
"single_word": false
|
| 31 |
-
},
|
| 32 |
-
"unk_token": {
|
| 33 |
-
"content": "<|end_of_text|>",
|
| 34 |
-
"lstrip": false,
|
| 35 |
-
"normalized": false,
|
| 36 |
-
"rstrip": false,
|
| 37 |
-
"single_word": false
|
| 38 |
-
}
|
| 39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
answer_relevance_rewriter/granite-3.3-8b-instruct/lora/tokenizer_config.json
DELETED
|
@@ -1,235 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": false,
|
| 3 |
-
"add_prefix_space": false,
|
| 4 |
-
"added_tokens_decoder": {
|
| 5 |
-
"0": {
|
| 6 |
-
"content": "<|end_of_text|>",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": false,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false,
|
| 11 |
-
"special": true
|
| 12 |
-
},
|
| 13 |
-
"1": {
|
| 14 |
-
"content": "<fim_prefix>",
|
| 15 |
-
"lstrip": false,
|
| 16 |
-
"normalized": false,
|
| 17 |
-
"rstrip": false,
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"special": true
|
| 20 |
-
},
|
| 21 |
-
"2": {
|
| 22 |
-
"content": "<fim_middle>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": false,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false,
|
| 27 |
-
"special": true
|
| 28 |
-
},
|
| 29 |
-
"3": {
|
| 30 |
-
"content": "<fim_suffix>",
|
| 31 |
-
"lstrip": false,
|
| 32 |
-
"normalized": false,
|
| 33 |
-
"rstrip": false,
|
| 34 |
-
"single_word": false,
|
| 35 |
-
"special": true
|
| 36 |
-
},
|
| 37 |
-
"4": {
|
| 38 |
-
"content": "<fim_pad>",
|
| 39 |
-
"lstrip": false,
|
| 40 |
-
"normalized": false,
|
| 41 |
-
"rstrip": false,
|
| 42 |
-
"single_word": false,
|
| 43 |
-
"special": true
|
| 44 |
-
},
|
| 45 |
-
"5": {
|
| 46 |
-
"content": "<filename>",
|
| 47 |
-
"lstrip": false,
|
| 48 |
-
"normalized": false,
|
| 49 |
-
"rstrip": false,
|
| 50 |
-
"single_word": false,
|
| 51 |
-
"special": true
|
| 52 |
-
},
|
| 53 |
-
"6": {
|
| 54 |
-
"content": "<gh_stars>",
|
| 55 |
-
"lstrip": false,
|
| 56 |
-
"normalized": false,
|
| 57 |
-
"rstrip": false,
|
| 58 |
-
"single_word": false,
|
| 59 |
-
"special": true
|
| 60 |
-
},
|
| 61 |
-
"7": {
|
| 62 |
-
"content": "<issue_start>",
|
| 63 |
-
"lstrip": false,
|
| 64 |
-
"normalized": false,
|
| 65 |
-
"rstrip": false,
|
| 66 |
-
"single_word": false,
|
| 67 |
-
"special": true
|
| 68 |
-
},
|
| 69 |
-
"8": {
|
| 70 |
-
"content": "<issue_comment>",
|
| 71 |
-
"lstrip": false,
|
| 72 |
-
"normalized": false,
|
| 73 |
-
"rstrip": false,
|
| 74 |
-
"single_word": false,
|
| 75 |
-
"special": true
|
| 76 |
-
},
|
| 77 |
-
"9": {
|
| 78 |
-
"content": "<issue_closed>",
|
| 79 |
-
"lstrip": false,
|
| 80 |
-
"normalized": false,
|
| 81 |
-
"rstrip": false,
|
| 82 |
-
"single_word": false,
|
| 83 |
-
"special": true
|
| 84 |
-
},
|
| 85 |
-
"10": {
|
| 86 |
-
"content": "<jupyter_start>",
|
| 87 |
-
"lstrip": false,
|
| 88 |
-
"normalized": false,
|
| 89 |
-
"rstrip": false,
|
| 90 |
-
"single_word": false,
|
| 91 |
-
"special": true
|
| 92 |
-
},
|
| 93 |
-
"11": {
|
| 94 |
-
"content": "<jupyter_text>",
|
| 95 |
-
"lstrip": false,
|
| 96 |
-
"normalized": false,
|
| 97 |
-
"rstrip": false,
|
| 98 |
-
"single_word": false,
|
| 99 |
-
"special": true
|
| 100 |
-
},
|
| 101 |
-
"12": {
|
| 102 |
-
"content": "<jupyter_code>",
|
| 103 |
-
"lstrip": false,
|
| 104 |
-
"normalized": false,
|
| 105 |
-
"rstrip": false,
|
| 106 |
-
"single_word": false,
|
| 107 |
-
"special": true
|
| 108 |
-
},
|
| 109 |
-
"13": {
|
| 110 |
-
"content": "<jupyter_output>",
|
| 111 |
-
"lstrip": false,
|
| 112 |
-
"normalized": false,
|
| 113 |
-
"rstrip": false,
|
| 114 |
-
"single_word": false,
|
| 115 |
-
"special": true
|
| 116 |
-
},
|
| 117 |
-
"14": {
|
| 118 |
-
"content": "<empty_output>",
|
| 119 |
-
"lstrip": false,
|
| 120 |
-
"normalized": false,
|
| 121 |
-
"rstrip": false,
|
| 122 |
-
"single_word": false,
|
| 123 |
-
"special": true
|
| 124 |
-
},
|
| 125 |
-
"15": {
|
| 126 |
-
"content": "<commit_before>",
|
| 127 |
-
"lstrip": false,
|
| 128 |
-
"normalized": false,
|
| 129 |
-
"rstrip": false,
|
| 130 |
-
"single_word": false,
|
| 131 |
-
"special": true
|
| 132 |
-
},
|
| 133 |
-
"16": {
|
| 134 |
-
"content": "<commit_msg>",
|
| 135 |
-
"lstrip": false,
|
| 136 |
-
"normalized": false,
|
| 137 |
-
"rstrip": false,
|
| 138 |
-
"single_word": false,
|
| 139 |
-
"special": true
|
| 140 |
-
},
|
| 141 |
-
"17": {
|
| 142 |
-
"content": "<commit_after>",
|
| 143 |
-
"lstrip": false,
|
| 144 |
-
"normalized": false,
|
| 145 |
-
"rstrip": false,
|
| 146 |
-
"single_word": false,
|
| 147 |
-
"special": true
|
| 148 |
-
},
|
| 149 |
-
"18": {
|
| 150 |
-
"content": "<reponame>",
|
| 151 |
-
"lstrip": false,
|
| 152 |
-
"normalized": false,
|
| 153 |
-
"rstrip": false,
|
| 154 |
-
"single_word": false,
|
| 155 |
-
"special": true
|
| 156 |
-
},
|
| 157 |
-
"49152": {
|
| 158 |
-
"content": "<|start_of_role|>",
|
| 159 |
-
"lstrip": false,
|
| 160 |
-
"normalized": false,
|
| 161 |
-
"rstrip": false,
|
| 162 |
-
"single_word": false,
|
| 163 |
-
"special": true
|
| 164 |
-
},
|
| 165 |
-
"49153": {
|
| 166 |
-
"content": "<|end_of_role|>",
|
| 167 |
-
"lstrip": false,
|
| 168 |
-
"normalized": false,
|
| 169 |
-
"rstrip": false,
|
| 170 |
-
"single_word": false,
|
| 171 |
-
"special": true
|
| 172 |
-
},
|
| 173 |
-
"49154": {
|
| 174 |
-
"content": "<|tool_call|>",
|
| 175 |
-
"lstrip": false,
|
| 176 |
-
"normalized": false,
|
| 177 |
-
"rstrip": false,
|
| 178 |
-
"single_word": false,
|
| 179 |
-
"special": true
|
| 180 |
-
},
|
| 181 |
-
"49155": {
|
| 182 |
-
"content": "<|start_of_cite|>",
|
| 183 |
-
"lstrip": false,
|
| 184 |
-
"normalized": false,
|
| 185 |
-
"rstrip": false,
|
| 186 |
-
"single_word": false,
|
| 187 |
-
"special": true
|
| 188 |
-
},
|
| 189 |
-
"49156": {
|
| 190 |
-
"content": "<|end_of_cite|>",
|
| 191 |
-
"lstrip": false,
|
| 192 |
-
"normalized": false,
|
| 193 |
-
"rstrip": false,
|
| 194 |
-
"single_word": false,
|
| 195 |
-
"special": true
|
| 196 |
-
},
|
| 197 |
-
"49157": {
|
| 198 |
-
"content": "<|start_of_plugin|>",
|
| 199 |
-
"lstrip": false,
|
| 200 |
-
"normalized": false,
|
| 201 |
-
"rstrip": false,
|
| 202 |
-
"single_word": false,
|
| 203 |
-
"special": true
|
| 204 |
-
},
|
| 205 |
-
"49158": {
|
| 206 |
-
"content": "<|end_of_plugin|>",
|
| 207 |
-
"lstrip": false,
|
| 208 |
-
"normalized": false,
|
| 209 |
-
"rstrip": false,
|
| 210 |
-
"single_word": false,
|
| 211 |
-
"special": true
|
| 212 |
-
}
|
| 213 |
-
},
|
| 214 |
-
"additional_special_tokens": [
|
| 215 |
-
"<|start_of_role|>",
|
| 216 |
-
"<|end_of_role|>",
|
| 217 |
-
"<|tool_call|>",
|
| 218 |
-
"<|start_of_cite|>",
|
| 219 |
-
"<|end_of_cite|>",
|
| 220 |
-
"<|start_of_plugin|>",
|
| 221 |
-
"<|end_of_plugin|>"
|
| 222 |
-
],
|
| 223 |
-
"bos_token": "<|end_of_text|>",
|
| 224 |
-
"chat_template": "{# Alias tools -> available_tools #}\n{%- if tools and not available_tools -%}\n {%- set available_tools = tools -%}\n{%- endif -%}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n {%- else %}\n {%- set system_message = \"Knowledge Cutoff Date: April 2024.\nToday's Date: \" + strftime_now('%B %d, %Y') + \".\nYou are Granite, developed by IBM.\" %}\n {%- if available_tools and documents %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\nWrite the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif available_tools %}\n {%- set system_message = system_message + \" You are a helpful assistant with access to the following tools. When a tool is required to answer the user's query, respond only with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.\" %}\n {%- elif documents %}\n {%- set system_message = system_message + \" Write the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.\" %}\n {%- elif thinking %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\nRespond to every user query in a comprehensive and detailed way. You can write down your thoughts and reasoning process before responding. In the thought process, engage in a comprehensive cycle of analysis, summarization, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. In the response section, based on various attempts, explorations, and reflections from the thoughts section, systematically present the final solution that you deem correct. The response should summarize the thought process. Write your thoughts between <think></think> and write your response between <response></response> for each user query.\" %}\n {%- else %}\n {%- set system_message = system_message + \" You are a helpful AI assistant.\" %}\n {%- endif %}\n {%- if 'citations' in controls and documents %}\n {%- set system_message = system_message + '\nUse the symbols <|start_of_cite|> and <|end_of_cite|> to indicate when a fact comes from a document in the search result, e.g <|start_of_cite|> {document_id: 1}my fact <|end_of_cite|> for a fact from document 1. Afterwards, list all the citations with their corresponding documents in an ordered list.' %}\n {%- endif %}\n {%- if 'hallucinations' in controls and documents %}\n {%- set system_message = system_message + '\nFinally, after the response is written, include a numbered list of sentences from the response with a corresponding risk value that are hallucinated and not based in the documents.' %}\n {%- endif %}\n {%- set loop_messages = messages %}\n {%- endif %}\n {{- '<|start_of_role|>system<|end_of_role|>' + system_message + '<|end_of_text|>\n' }}\n {%- if available_tools %}\n {{- '<|start_of_role|>available_tools<|end_of_role|>' }}\n {{- available_tools | tojson(indent=4) }}\n {{- '<|end_of_text|>\n' }}\n {%- endif %}\n {%- if documents %}\n {%- for document in documents %}\n {{- '<|start_of_role|>document {\"document_id\": \"' + document['doc_id'] | string + '\"}<|end_of_role|>\n' }}\n {{- document['text'] }}\n {{- '<|end_of_text|>\n' }}\n {%- endfor %}\n {%- endif %}\n {%- for message in loop_messages %}\n {{- '<|start_of_role|>' + message['role'] + '<|end_of_role|>' + message['content'] + '<|end_of_text|>\n' }}\n {%- if loop.last and add_generation_prompt %}\n {{- '<|start_of_role|>assistant' }}\n {%- if controls %}\n {{- ' ' + controls | tojson()}}\n {%- endif %}\n {{- '<|end_of_role|>' }}\n {%- endif %}\n {%- endfor %}",
|
| 225 |
-
"clean_up_tokenization_spaces": true,
|
| 226 |
-
"eos_token": "<|end_of_text|>",
|
| 227 |
-
"errors": "replace",
|
| 228 |
-
"extra_special_tokens": {},
|
| 229 |
-
"model_max_length": 9223372036854775807,
|
| 230 |
-
"pad_token": "<|end_of_text|>",
|
| 231 |
-
"padding_side": "left",
|
| 232 |
-
"tokenizer_class": "GPT2Tokenizer",
|
| 233 |
-
"unk_token": "<|end_of_text|>",
|
| 234 |
-
"vocab_size": 49152
|
| 235 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|