https://github.com/shivasurya/build-llm-scratch-manning-experiment
Building LLM from scratch experiment via Manning MEAP
https://github.com/shivasurya/build-llm-scratch-manning-experiment
Last synced: 2 months ago
JSON representation
Building LLM from scratch experiment via Manning MEAP
- Host: GitHub
- URL: https://github.com/shivasurya/build-llm-scratch-manning-experiment
- Owner: shivasurya
- Created: 2024-05-27T23:53:43.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-02T22:07:01.000Z (11 months ago)
- Last Synced: 2025-01-05T12:42:11.212Z (4 months ago)
- Language: Jupyter Notebook
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# build-llm-scratch-manning-experiment
Building LLM from scratch experiment via Manning MEAP### Trained Model
1. Text Spam Classifier - published in [huggingface](https://huggingface.co/shivasuryas/spam_classifier)
### Using Model
```python
import torch....
....
# modify based on CPU/GPU
model_state_dict = torch.load("spam_classifier.pth", map_location=torch.device('cpu'))
model.load_state_dict(model_state_dict)
text_1 = (
"I love to go to Waterloo university and summer break"
""
)
print(classify_review(
text_1, model, tokenizer, device, max_length=train_dataset.max_length
))
```