Views
No views yet
model_id = "meta-llama/Llama-3.1-8B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
tokenizer.padding_side = "left"
tokenizer.pad_token = tokenizer.eos_token
token = {your token here for LLM}
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto",attn_implementation="flash_attention_2", torch_dtype=torch.bfloat16, token=token)
model.load_adapter("skoneru/iwslt_asr_fuser") Post-Edit the Automatic Speech Recognition Transcripts from different systems understanding the context.
ASR Transcripts:
System 1:
{system 1 outputs here}
System 2:
{system 2 outputs here}
System 3:
{system 3 outputs here}
System 4:
{system 4 outputs here}
Post-Edited Transcript:
{llm to generate}system1= "Embeddings such as word to back are very famous"
system2= "Embeddings such as bird to back are very famous"
system3= "Embeddings such as bird to back, are very famous"
system4= "Embeddings such as bird to back are very famous"
prompt = ["Post-Edit the Automatic Speech Recognition Transcripts from different systems understanding the context.\nASR Transcripts:\nSystem 1:\n" + system1 + "\nSystem 2:\n" + system2 + "\nSystem 3:\n" + system3 + "\nSystem 4:\n" + system4 + \nPost-Edited Transcript:\n"]
inputs = tokenizer(prompt, return_tensors="pt", padding=True, add_special_tokens=False).to(model.device)
num_beams=5
output = model.generate(**inputs, num_beams=num_beams, max_new_tokens=2048, return_dict_in_generate=True, early_stopping=True, do_sample=False)
hyps = tokenizer.batch_decode(output.sequences[:,inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(hyps)1@inproceedings{koneru2025kit,
2 title={KIT's Offline Speech Translation and Instruction Following Submission for IWSLT 2025},
3 author={Koneru, Sai and Z{\"u}fle, Maike and Nguyen, Thai-Binh and Akti, Seymanur and Niehues, Jan and Waibel, Alexander},
4 journal={arXiv preprint arXiv:2505.13036},
5 year={2025},
6 url={https://arxiv.org/abs/2505.13036}
7}