Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izuna385/bert-article-recommender-with-faiss
Article Recommender with fine-tuned BERT and faiss.
https://github.com/izuna385/bert-article-recommender-with-faiss
allennlp approximate-nearest-neighbor-search bert faiss fastapi natural-language-processing recommender-system
Last synced: about 1 month ago
JSON representation
Article Recommender with fine-tuned BERT and faiss.
- Host: GitHub
- URL: https://github.com/izuna385/bert-article-recommender-with-faiss
- Owner: izuna385
- Created: 2021-03-04T12:55:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-14T11:56:54.000Z (almost 4 years ago)
- Last Synced: 2024-10-18T19:54:27.528Z (4 months ago)
- Topics: allennlp, approximate-nearest-neighbor-search, bert, faiss, fastapi, natural-language-processing, recommender-system
- Language: Python
- Homepage: https://qiita.com/izuna385/items/7074af1361a6bbfba7d4
- Size: 519 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BERT-Article-Recommender-with-Faiss
* BERTとfaissを用いた記事推薦の実装# モデル
![dummy](./img/model.png)# 環境設定
```
$ conda create -n allennlp python=3.7
$ conda activate allennlp
$ pip install -r requirements.txt
$ download.sh
```# 実験方法
$ `python3 main.py -num_epochs 10`* 特にパラメータ調整は行っていない。dev acc. ~85%, test acc. ~83%.
# 記事推薦モデルの立ち上げ
```
$ python3 main.py -num_epochs 10
$ uvicorn api:app --reload --host 0.0.0.0 --port 8000
```# 記事推薦モデルの構成
![test](./img/recommend.png)
# 参考
[https://qiita.com/izuna385/items/a004982f76256cab1b2d](https://qiita.com/izuna385/items/a004982f76256cab1b2d)# その他
* faiss関連でエラーが起こる場合、faissを一度削除して以下を試して下さい。
`pip install faiss-cpu --no-cache`
(参考記事:https://github.com/facebookresearch/faiss/issues/821#issuecomment-573531694)