Bilingual (English + Korean) LSTM seq2seq debate chatbot. The encoder is a
frozen XLM-RoBERTa-base providing contextual hidden states; the decoder is
an LSTM with Bahdanau attention. Trained on debate-shape (topic, PRO, CON)
records plus discourse corpora for fluency.
1import torch, sentencepiece as spm
2from huggingface_hub import hf_hub_download
3from src.model.lstm_seq2seq import Seq2Seq
4
5ckpt_path = hf_hub_download("ada-flo/nlp-hack-debate-xlmr-lstm", "best.pt")
6sp_path = hf_hub_download("ada-flo/nlp-hack-debate-xlmr-lstm", "spm.model")
7
8sp = spm.SentencePieceProcessor()
9sp.Load(sp_path)
10ckpt = torch.load(ckpt_path, map_location="cuda", weights_only=False)
11
12model = Seq2Seq(
13 vocab_size=sp.get_piece_size(),
14 embed_dim=256, hidden_dim=512,
15 enc_layers=2, dec_layers=1,
16 dropout=0.0, encoder_type="xlmr",
17).cuda().eval()
18model.load_state_dict(ckpt["model_state"], strict=False)
Training data is published separately as a HF dataset. See the source repo
(
https://github.com/ada-flo/nlp-hack) for the preprocessing pipeline.
CC BY 4.0. Underlying corpora retain their original licenses; consult the
source repo for details before commercial use.