Update README.md
Browse files
README.md
CHANGED
|
@@ -18,11 +18,13 @@ AllyArc is an innovative chatbot tailored for the educational support of autisti
|
|
| 18 |
- **Language(s) (NLP):** Primarily English, with potential multilingual support.
|
| 19 |
- **Finetuned from model:** Mistral 7b.
|
| 20 |
|
|
|
|
| 21 |
### Model Sources [optional]
|
| 22 |
|
| 23 |
- **Repository:** [GitHub or other repository link]
|
| 24 |
- **Paper [Coming Soon]:** [Link to any research paper published]
|
| 25 |
- **Demo [Coming Soon]:** [Link to a live demo if available]
|
|
|
|
| 26 |
|
| 27 |
## Uses
|
| 28 |
|
|
@@ -30,7 +32,7 @@ AllyArc is an innovative chatbot tailored for the educational support of autisti
|
|
| 30 |
|
| 31 |
AllyArc can be directly interacted with by students and educators through a conversational interface, providing instant responses to queries and aiding in learning.
|
| 32 |
|
| 33 |
-
### Downstream Use
|
| 34 |
|
| 35 |
The model can be integrated into educational platforms or applications as a support tool for autistic students, offering personalized assistance.
|
| 36 |
|
|
@@ -46,13 +48,75 @@ While designed to be inclusive, there is a risk of unintended bias in responses
|
|
| 46 |
|
| 47 |
Educators should monitor interactions and provide regular feedback to improve AllyArc's accuracy and sensitivity. Users should be aware of the model's limitations and not rely on it for critical decisions.
|
| 48 |
|
| 49 |
-
## How to Get Started with the Model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
-
[AllyArc Interactive Colab Notebook](https://colab.research.google.com/drive/1MiGTw7nKMFbE8FllpVAW66DTmQSzOTFd?usp=sharing)
|
| 54 |
|
| 55 |
-
The notebook contains all the necessary instructions to initialize the model, interact with it, and understand its output. Follow the steps in the notebook to get a hands-on experience with AllyArc.
|
| 56 |
<!--
|
| 57 |
|
| 58 |
## Training Details
|
|
|
|
| 18 |
- **Language(s) (NLP):** Primarily English, with potential multilingual support.
|
| 19 |
- **Finetuned from model:** Mistral 7b.
|
| 20 |
|
| 21 |
+
<!--
|
| 22 |
### Model Sources [optional]
|
| 23 |
|
| 24 |
- **Repository:** [GitHub or other repository link]
|
| 25 |
- **Paper [Coming Soon]:** [Link to any research paper published]
|
| 26 |
- **Demo [Coming Soon]:** [Link to a live demo if available]
|
| 27 |
+
-->
|
| 28 |
|
| 29 |
## Uses
|
| 30 |
|
|
|
|
| 32 |
|
| 33 |
AllyArc can be directly interacted with by students and educators through a conversational interface, providing instant responses to queries and aiding in learning.
|
| 34 |
|
| 35 |
+
### Downstream Use
|
| 36 |
|
| 37 |
The model can be integrated into educational platforms or applications as a support tool for autistic students, offering personalized assistance.
|
| 38 |
|
|
|
|
| 48 |
|
| 49 |
Educators should monitor interactions and provide regular feedback to improve AllyArc's accuracy and sensitivity. Users should be aware of the model's limitations and not rely on it for critical decisions.
|
| 50 |
|
| 51 |
+
## How to Get Started with the Model on Google Colab
|
| 52 |
+
|
| 53 |
+
To explore and interact with AllyArc using Google Colab:
|
| 54 |
+
|
| 55 |
+
1. Open the [AllyArc Interactive Colab Notebook](https://colab.research.google.com/drive/1MiGTw7nKMFbE8FllpVAW66DTmQSzOTFd?usp=sharing).
|
| 56 |
+
2. Go to `File > Save a copy in Drive` to create a personal copy of the notebook.
|
| 57 |
+
3. Obtain a Hugging Face API token by creating an account or logging in at [Hugging Face](https://huggingface.co/).
|
| 58 |
+
4. In your copied notebook, replace `YOUR_HUGGING_FACE_TOKEN_HERE` with your actual Hugging Face token.
|
| 59 |
+
5. Follow the instructions in the notebook to install necessary libraries and dependencies.
|
| 60 |
+
6. Run the cells step by step to initialize and interact with the AllyArc model.
|
| 61 |
+
|
| 62 |
+
Please ensure you have the appropriate permissions and quotas on Google Colab to run the model without interruption.
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
## How to Get Started with the AllyArc Model Locally
|
| 66 |
+
|
| 67 |
+
To run the AllyArc model on your local machine, follow these steps:
|
| 68 |
+
|
| 69 |
+
1. Ensure you have Python installed on your system.
|
| 70 |
+
2. Install the necessary Python packages by running:
|
| 71 |
+
```bash
|
| 72 |
+
pip install transformers tokenizers sentencepiece
|
| 73 |
+
```
|
| 74 |
+
3. Obtain a Hugging Face API token by creating an account or logging in at [Hugging Face](https://huggingface.co/settings/tokens).
|
| 75 |
+
4. Set an environment variable for your Hugging Face token. You can do this by running the following command in your terminal (replace `<your_hugging_face_token>` with your actual token):
|
| 76 |
+
```bash
|
| 77 |
+
export HUGGING_FACE_API_KEY=<your_hugging_face_token>
|
| 78 |
+
```
|
| 79 |
+
5. Create a new Python script or open a Python interactive shell and input the following code:
|
| 80 |
+
|
| 81 |
+
```python
|
| 82 |
+
import os
|
| 83 |
+
from huggingface_hub import hf_hub_download
|
| 84 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
| 85 |
+
|
| 86 |
+
# Replace <hugging-face-api-key-goes-here> with your Hugging Face token
|
| 87 |
+
HUGGING_FACE_API_KEY = os.environ.get("HUGGING_FACE_API_KEY")
|
| 88 |
+
|
| 89 |
+
model_id = "ZainabF/allyarc_finetune_model_sample"
|
| 90 |
+
|
| 91 |
+
filenames = [
|
| 92 |
+
"pytorch_model.bin", "added_tokens.json", "config.json", "generation_config.json",
|
| 93 |
+
"special_tokens_map.json", "spiece.model", "tokenizer_config.json", "pytorch_model.bin.index.json"
|
| 94 |
+
]
|
| 95 |
+
|
| 96 |
+
for filename in filenames:
|
| 97 |
+
downloaded_model_path = hf_hub_download(
|
| 98 |
+
repo_id=model_id,
|
| 99 |
+
filename=filename,
|
| 100 |
+
token=HUGGING_FACE_API_KEY
|
| 101 |
+
)
|
| 102 |
+
print(f"Downloaded {filename} to {downloaded_model_path}")
|
| 103 |
+
|
| 104 |
+
# Initialize the tokenizer and model
|
| 105 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, legacy=False)
|
| 106 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
|
| 107 |
+
|
| 108 |
+
# Set up the pipeline for text generation
|
| 109 |
+
text_gen_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=1000)
|
| 110 |
+
|
| 111 |
+
# Generate a response
|
| 112 |
+
response = text_gen_pipeline("How I'm upset that I got low mark at math, please help me")
|
| 113 |
+
print(response)
|
| 114 |
+
```
|
| 115 |
+
6. Execute the script to download the model and interact with it.
|
| 116 |
|
| 117 |
+
Please ensure that your environment variables are correctly set, and that the necessary packages are installed before running the script. The script will download the model files and then initialize the model for text generation, allowing you to input prompts and receive responses.
|
| 118 |
|
|
|
|
| 119 |
|
|
|
|
| 120 |
<!--
|
| 121 |
|
| 122 |
## Training Details
|