mertNB commited on
Commit
36808c1
1 Parent(s): 41bbbd3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -4
README.md CHANGED
@@ -11,11 +11,15 @@ tags:
11
  # **Rago v2 13B**
12
  **Rago v2 13B is a [Llama 2 13B](https://huggingface.co/meta-llama/Llama-2-13b-hf)-based retrieval-augmented generation-optimized model built by [Neural Bridge AI](https://www.neuralbridge.ai/) and trained on [RAG Full Dataset 20000](https://huggingface.co/datasets/neural-bridge/rag-full-20000). It is available under [Apache license 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).**
13
 
14
- ## **Model Details**
15
- Rago v2 13B model is a retrieval-augmented generation-optimized (RAGO) model that enhances large language models by integrating an external authoritative knowledge base (context) for generating responses. This integration significantly improves the model's ability to produce relevant, accurate, and context-specific output across specialized domains or internal data without necessitating retraining. It addresses key challenges of large language models (LLMs), such as unpredictability, reliance on potentially outdated data, and the propagation of incorrect information, thereby improving user trust in AI applications. Rago v2 13B, specifically, is an advancement built upon the [Llama 2 13B](https://huggingface.co/meta-llama/Llama-2-13b-hf) model, optimized for retrieval-augmented generation, making it particularly effective in contextually aware response generation.
16
 
17
  ```python
18
- model = "neural-bridge/Rago-v2-7b"
 
 
 
 
19
 
20
  tokenizer = AutoTokenizer.from_pretrained(model)
21
  pipeline = transformers.pipeline(
@@ -49,4 +53,20 @@ def print_result(generated_text):
49
 
50
  for seq in sequences:
51
  print_result(seq["generated_text"])
52
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  # **Rago v2 13B**
12
  **Rago v2 13B is a [Llama 2 13B](https://huggingface.co/meta-llama/Llama-2-13b-hf)-based retrieval-augmented generation-optimized model built by [Neural Bridge AI](https://www.neuralbridge.ai/) and trained on [RAG Full Dataset 20000](https://huggingface.co/datasets/neural-bridge/rag-full-20000). It is available under [Apache license 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).**
13
 
14
+ ## **Model Description**
15
+ Rago v2 13B model is a retrieval-augmented generation-optimized (RAGO) model, which enhances large language models by integrating an external authoritative knowledge base (context) for generating responses. This integration significantly improves the model's ability to produce relevant, accurate, and context-specific output across specialized domains or internal data without necessitating retraining. It addresses key challenges of large language models (LLMs), such as unpredictability, reliance on potentially outdated data, and the propagation of incorrect information, thereby improving user trust in AI applications. Rago v2 13B, specifically, is an advancement built upon the [Llama 2 13B](https://huggingface.co/meta-llama/Llama-2-13b-hf) model, optimized for retrieval-augmented generation, making it particularly effective in contextually aware response generation.
16
 
17
  ```python
18
+ from transformers import AutoTokenizer, AutoModelForCausalLM
19
+ import transformers
20
+ import torch
21
+
22
+ model = "neural-bridge/Rago-v2-13b"
23
 
24
  tokenizer = AutoTokenizer.from_pretrained(model)
25
  pipeline = transformers.pipeline(
 
53
 
54
  for seq in sequences:
55
  print_result(seq["generated_text"])
56
+ ```
57
+
58
+ ## **Model Details**
59
+
60
+ ### Training Data
61
+
62
+ Rago v2 13B is trained using the [Neural Bridge's RAG Full 20000](https://huggingface.co/datasets/neural-bridge/rag-full-20000) dataset, which is a dataset that is mixture of [RefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb), [gms8k](https://huggingface.co/datasets/gsm8k), and [RAG Hallucination Dataset 1000](https://huggingface.co/datasets/neural-bridge/rag-hallucination-dataset-1000).
63
+
64
+ ### Training Details
65
+
66
+ Rago v2 13B is built upon [Llama 2 13B](https://huggingface.co/meta-llama/Llama-2-13b-hf) using [LoRA](https://arxiv.org/abs/2106.09685). It is designed to improve the model's ability to produce relevant, accurate, and context-specific output across specialized domains or internal data and to address key challenges of LLMs by taking advantage of the power of RAG, such as unpredictability, reliance on potentially outdated data, the propagation of incorrect information, etc. The models has the same architecture as [Llama 2 13B's](https://huggingface.co/meta-llama/Llama-2-13b-hf) in addition to the LoRA adapters. The model is trained with an NVIDIA A100 for around 2 days with 1e-5 learning rate (with cosine schedular) as well as the following LoRA parameters:
67
+ * LoRA Rank (R): 64
68
+ * LoRA Alpha: 16
69
+ * LoRA Dropout: 0.1
70
+ * Target Modules: *q_proj, k_proj, v_proj, o_proj*
71
+
72
+ Rago v2 13B is boosted a custom data collator to enhance the model performace. It is trained embracing the masked language modeling (MLM) approach. Thereby, it is pushed to generate more accurate responses by only masking the answer part of the training data. Thanks to the custom data collator, it is observed improvement in the factuality performance of the model.