Instructions to use Johonson/adasparse-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Johonson/adasparse-8B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -17,15 +17,15 @@ the tokenizer, and the retriever config.
|
|
| 17 |
|
| 18 |
## Usage
|
| 19 |
|
| 20 |
-
Requires the [
|
| 21 |
|
| 22 |
```python
|
| 23 |
import torch
|
| 24 |
from transformers import AutoTokenizer
|
| 25 |
from scaling_retriever.modeling.llm_encoder import LlamaBiSparse
|
| 26 |
|
| 27 |
-
model = LlamaBiSparse.load_from_lora("
|
| 28 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 29 |
|
| 30 |
queries = ["What is the capital of France?"]
|
| 31 |
passages = ["Paris is the capital of France."]
|
|
|
|
| 17 |
|
| 18 |
## Usage
|
| 19 |
|
| 20 |
+
Requires the [AdaSparse](https://github.com/ViViVidam/AdaSparse) codebase:
|
| 21 |
|
| 22 |
```python
|
| 23 |
import torch
|
| 24 |
from transformers import AutoTokenizer
|
| 25 |
from scaling_retriever.modeling.llm_encoder import LlamaBiSparse
|
| 26 |
|
| 27 |
+
model = LlamaBiSparse.load_from_lora("Johonson/adasparse-8B")
|
| 28 |
+
tokenizer = AutoTokenizer.from_pretrained("Johonson/adasparse-8B")
|
| 29 |
|
| 30 |
queries = ["What is the capital of France?"]
|
| 31 |
passages = ["Paris is the capital of France."]
|