Transformers
Safetensors
unsloth
mistral
lora
education
study-abroad
parameter-efficient-tuning
domain-adaptation
nlp
kaggle
Instructions to use millat/StudyAbroadGPT-7B-LoRa-Kaggle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use millat/StudyAbroadGPT-7B-LoRa-Kaggle with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("millat/StudyAbroadGPT-7B-LoRa-Kaggle", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Add comprehensive README with all formats and quantizations
Browse files
README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
license: mit
|
|
|
|
| 5 |
datasets:
|
| 6 |
- millat/StudyAbroadGPT-Dataset
|
| 7 |
-
language:
|
| 8 |
-
- en
|
| 9 |
---
|
| 10 |
|
| 11 |
# StudyAbroadGPT-7B-LoRa: Specialized Educational Guidance Model
|
|
@@ -14,138 +20,133 @@ language:
|
|
| 14 |
|
| 15 |
StudyAbroadGPT-7B-LoRa is a specialized language model fine-tuned for providing comprehensive study abroad consultation and educational guidance. Based on the Mistral-7B model, it utilizes parameter-efficient fine-tuning through Low-Rank Adaptation (LoRA) to deliver accurate, personalized guidance for students seeking higher education opportunities abroad.
|
| 16 |
|
| 17 |
-
##
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
-
|
| 23 |
-
|
| 24 |
-
##
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
- **
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
##
|
| 87 |
|
| 88 |
```python
|
| 89 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 90 |
import torch
|
| 91 |
|
| 92 |
-
# Load model and tokenizer
|
| 93 |
model = AutoModelForCausalLM.from_pretrained(
|
| 94 |
"millat/StudyAbroadGPT-7B-LoRa-Kaggle",
|
|
|
|
| 95 |
torch_dtype=torch.float16,
|
| 96 |
-
|
| 97 |
-
)
|
| 98 |
-
tokenizer = AutoTokenizer.from_pretrained("millat/StudyAbroadGPT-7B-LoRa-Kaggle")
|
| 99 |
-
|
| 100 |
-
# Example query
|
| 101 |
-
query = """I'm interested in pursuing a Master's in Computer Science in the USA.
|
| 102 |
-
My GPA is 3.5/4.0 and I have a TOEFL score of 100. What universities should I consider?"""
|
| 103 |
-
|
| 104 |
-
# Generate response
|
| 105 |
-
inputs = tokenizer(query, return_tensors="pt").to(model.device)
|
| 106 |
-
outputs = model.generate(
|
| 107 |
-
**inputs,
|
| 108 |
-
max_length=1024,
|
| 109 |
-
temperature=0.7,
|
| 110 |
-
top_p=0.9
|
| 111 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 113 |
print(response)
|
| 114 |
```
|
| 115 |
|
| 116 |
-
##
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
- University-specific details may need verification
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
|
|
| 127 |
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
|
| 133 |
-
##
|
| 134 |
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
- Mention budget constraints if applicable
|
| 140 |
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
## Citation
|
| 147 |
|
| 148 |
-
If you use this model
|
| 149 |
|
| 150 |
```bibtex
|
| 151 |
@misc{millat2025studyabroadgpt,
|
|
@@ -157,28 +158,6 @@ If you use this model in your research, please cite:
|
|
| 157 |
}
|
| 158 |
```
|
| 159 |
|
| 160 |
-
And optionally the associated paper:
|
| 161 |
-
|
| 162 |
-
```bibtex
|
| 163 |
-
@article{hosen2025lora,
|
| 164 |
-
title={A LoRA-Based Approach to Fine-Tuning LLMs for Educational Guidance in Resource-Constrained Settings},
|
| 165 |
-
author={Hosen, Md Millat},
|
| 166 |
-
journal={arXiv preprint arXiv:2504.15610},
|
| 167 |
-
year={2025}
|
| 168 |
-
}
|
| 169 |
-
```
|
| 170 |
-
|
| 171 |
-
---
|
| 172 |
-
|
| 173 |
-
## π Relevant Links
|
| 174 |
-
|
| 175 |
-
* π [Model](https://huggingface.co/millat/StudyAbroadGPT-7B-LoRa-Kaggle)
|
| 176 |
-
* πΎ [Training Code](https://github.com/codermillat/StudyAbroadGPT)
|
| 177 |
-
* π§ [Author ORCID](https://orcid.org/0009-0005-7198-9893)
|
| 178 |
-
* π [Research paper (preprint)](https://arxiv.org/abs/2504.15610) β DOI: [10.48550/arXiv.2504.15610](https://doi.org/10.48550/arXiv.2504.15610)
|
| 179 |
-
* π» [Training code](https://github.com/codermillat/StudyAbroadGPT)
|
| 180 |
-
|
| 181 |
-
|
| 182 |
## License
|
| 183 |
|
| 184 |
-
This model is released under the
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- study-abroad
|
| 5 |
+
- education
|
| 6 |
+
- guidance
|
| 7 |
+
- mistral
|
| 8 |
+
- lora
|
| 9 |
+
- gguf
|
| 10 |
+
- onnx
|
| 11 |
license: mit
|
| 12 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.3
|
| 13 |
datasets:
|
| 14 |
- millat/StudyAbroadGPT-Dataset
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# StudyAbroadGPT-7B-LoRa: Specialized Educational Guidance Model
|
|
|
|
| 20 |
|
| 21 |
StudyAbroadGPT-7B-LoRa is a specialized language model fine-tuned for providing comprehensive study abroad consultation and educational guidance. Based on the Mistral-7B model, it utilizes parameter-efficient fine-tuning through Low-Rank Adaptation (LoRA) to deliver accurate, personalized guidance for students seeking higher education opportunities abroad.
|
| 22 |
|
| 23 |
+
## Available Formats
|
| 24 |
+
|
| 25 |
+
This repository contains the model in multiple formats and quantizations for different use cases:
|
| 26 |
+
|
| 27 |
+
### PyTorch Formats
|
| 28 |
+
- **Merged Model** (`merged/`): Full precision PyTorch model with merged LoRA weights (~14GB)
|
| 29 |
+
|
| 30 |
+
### GGUF Formats
|
| 31 |
+
|
| 32 |
+
GGUF files are available in the root directory. Choose the quantization level based on your hardware and quality requirements:
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
#### 2-BIT
|
| 36 |
+
|
| 37 |
+
- **Q2_K**: [studyabroadgpt-q2_k.gguf](studyabroadgpt-q2_k.gguf) - 2.72 GB β
|
| 38 |
+
|
| 39 |
+
#### 3-BIT
|
| 40 |
+
|
| 41 |
+
- **Q3_K_S**: [studyabroadgpt-q3_k_s.gguf](studyabroadgpt-q3_k_s.gguf) - 3.16 GB β
|
| 42 |
+
- **Q3_K_M**: [studyabroadgpt-q3_k_m.gguf](studyabroadgpt-q3_k_m.gguf) - 3.52 GB β
|
| 43 |
+
- **Q3_K_L**: [studyabroadgpt-q3_k_l.gguf](studyabroadgpt-q3_k_l.gguf) - 3.82 GB β
|
| 44 |
+
|
| 45 |
+
#### 4-BIT
|
| 46 |
+
|
| 47 |
+
- **Q4_0**: [studyabroadgpt-q4_0.gguf](studyabroadgpt-q4_0.gguf) - 4.00 GB β
|
| 48 |
+
- **Q4_K_S**: [studyabroadgpt-q4_k_s.gguf](studyabroadgpt-q4_k_s.gguf) - 4.14 GB β
|
| 49 |
+
- **Q4_K_M**: [studyabroadgpt-q4_k_m.gguf](studyabroadgpt-q4_k_m.gguf) - 4.37 GB β
|
| 50 |
+
|
| 51 |
+
#### 5-BIT
|
| 52 |
+
|
| 53 |
+
- **Q5_K_S**: [studyabroadgpt-q5_k_s.gguf](studyabroadgpt-q5_k_s.gguf) - 5.00 GB β
|
| 54 |
+
- **Q5_K_M**: [studyabroadgpt-q5_k_m.gguf](studyabroadgpt-q5_k_m.gguf) - 5.13 GB β
|
| 55 |
+
|
| 56 |
+
#### 6-BIT
|
| 57 |
+
|
| 58 |
+
- **Q6_K**: [studyabroadgpt-q6_k.gguf](studyabroadgpt-q6_k.gguf) - 5.94 GB β
|
| 59 |
+
|
| 60 |
+
#### 8-BIT
|
| 61 |
+
|
| 62 |
+
- **Q8_0**: [studyabroadgpt-q8_0.gguf](studyabroadgpt-q8_0.gguf) - 7.70 GB β
|
| 63 |
+
|
| 64 |
+
#### 16-bit
|
| 65 |
+
- **F16**: [studyabroadgpt-f16.gguf](studyabroadgpt-f16.gguf) - ~14.5 GB β
|
| 66 |
+
|
| 67 |
+
### ONNX Formats
|
| 68 |
+
- **ONNX FP16** (`onnx/`): Cross-platform inference format (~14GB)
|
| 69 |
+
- **ONNX INT8** (`onnx_int8/`): Quantized version for mobile/edge devices (~7GB)
|
| 70 |
+
|
| 71 |
+
## Hardware Compatibility
|
| 72 |
+
|
| 73 |
+
- **Apple M1 (8 GB)**: Q2_K, Q3_K_S, Q3_K_M, Q4_K_S recommended
|
| 74 |
+
- **Apple M1 (16 GB)**: Q4_K_M, Q5_K_S, Q5_K_M, Q6_K recommended
|
| 75 |
+
- **Desktop/Laptop (8 GB RAM)**: Q4_K_S, Q4_K_M recommended
|
| 76 |
+
- **Desktop/Laptop (16+ GB RAM)**: Q5_K_M, Q6_K, Q8_0, F16 recommended
|
| 77 |
+
|
| 78 |
+
## Usage
|
| 79 |
+
|
| 80 |
+
### GGUF Format
|
| 81 |
+
|
| 82 |
+
For GGUF files, use with [llama.cpp](https://github.com/ggerganov/llama.cpp) or compatible tools:
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
# Download the desired quantization
|
| 86 |
+
wget https://huggingface.co/millat/StudyAbroadGPT-7B-LoRa-Kaggle/resolve/main/studyabroadgpt-q4_k_m.gguf
|
| 87 |
+
|
| 88 |
+
# Run with llama.cpp
|
| 89 |
+
./main -m studyabroadgpt-q4_k_m.gguf -p "Your prompt here"
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
### PyTorch Format
|
| 93 |
|
| 94 |
```python
|
| 95 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 96 |
import torch
|
| 97 |
|
|
|
|
| 98 |
model = AutoModelForCausalLM.from_pretrained(
|
| 99 |
"millat/StudyAbroadGPT-7B-LoRa-Kaggle",
|
| 100 |
+
subfolder="merged",
|
| 101 |
torch_dtype=torch.float16,
|
| 102 |
+
device_map="auto"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
)
|
| 104 |
+
tokenizer = AutoTokenizer.from_pretrained("millat/StudyAbroadGPT-7B-LoRa-Kaggle", subfolder="merged")
|
| 105 |
+
|
| 106 |
+
# Generate
|
| 107 |
+
prompt = "I'm interested in pursuing a Master's in Computer Science in the USA..."
|
| 108 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 109 |
+
outputs = model.generate(**inputs, max_length=512, temperature=0.7)
|
| 110 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 111 |
print(response)
|
| 112 |
```
|
| 113 |
|
| 114 |
+
### ONNX Format
|
| 115 |
|
| 116 |
+
```python
|
| 117 |
+
from optimum.onnxruntime import ORTModelForCausalLM
|
| 118 |
+
from transformers import AutoTokenizer
|
|
|
|
| 119 |
|
| 120 |
+
model = ORTModelForCausalLM.from_pretrained(
|
| 121 |
+
"millat/StudyAbroadGPT-7B-LoRa-Kaggle",
|
| 122 |
+
subfolder="onnx"
|
| 123 |
+
)
|
| 124 |
+
tokenizer = AutoTokenizer.from_pretrained("millat/StudyAbroadGPT-7B-LoRa-Kaggle", subfolder="onnx")
|
| 125 |
|
| 126 |
+
inputs = tokenizer("Your prompt", return_tensors="pt")
|
| 127 |
+
outputs = model.generate(**inputs, max_length=512)
|
| 128 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 129 |
+
```
|
| 130 |
|
| 131 |
+
## Quantization Notes
|
| 132 |
|
| 133 |
+
- **IQ-quants** (if available) are often preferable over similar-sized non-IQ quants
|
| 134 |
+
- **Lower bit quantizations** (Q2_K, Q3_K) are smaller but may have quality trade-offs
|
| 135 |
+
- **Higher bit quantizations** (Q6_K, Q8_0) provide better quality at larger file sizes
|
| 136 |
+
- **F16** provides the best quality but requires significant storage and memory
|
|
|
|
| 137 |
|
| 138 |
+
## Model Information
|
| 139 |
+
|
| 140 |
+
- **Base Model**: mistralai/Mistral-7B-Instruct-v0.3
|
| 141 |
+
- **Architecture**: Mistral-7B with LoRA adaptation
|
| 142 |
+
- **LoRA Rank**: 16
|
| 143 |
+
- **LoRA Alpha**: 32
|
| 144 |
+
- **Context Length**: 2048 tokens
|
| 145 |
+
- **Training Dataset**: [millat/StudyAbroadGPT-Dataset](https://huggingface.co/datasets/millat/StudyAbroadGPT-Dataset)
|
| 146 |
|
| 147 |
## Citation
|
| 148 |
|
| 149 |
+
If you use this model, please cite:
|
| 150 |
|
| 151 |
```bibtex
|
| 152 |
@misc{millat2025studyabroadgpt,
|
|
|
|
| 158 |
}
|
| 159 |
```
|
| 160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
## License
|
| 162 |
|
| 163 |
+
This model is released under the MIT license.
|