Views
No views yet

| Model | Download |
|---|---|
| XMAiNframe-base-7b | 🤗 HuggingFace |
| XMAiNframe-instruct-7b | 🤗 HuggingFace |
| XMAiNframe-base-10.5b | 🤗 HuggingFace |
| XMAiNframe-instruct-10.5b | 🤗 HuggingFace |
apply_chat_template to show you how to load the tokenizer and model and how to generate contents.1from transformers import AutoTokenizer, AutoModelForCausalLM
2tokenizer = AutoTokenizer.from_pretrained("Fsoft-AIC/XMAiNframe-instruct-7b")
3model = AutoModelForCausalLM.from_pretrained("Fsoft-AIC/XMAiNframe-instruct-7b")
4messages=[
5 {'from':'system', 'value': "You are a helpful assistant"},
6 {'from': 'human', 'value': 'What is the future of Mainframe?'}
7]
8inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
9
10outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
11print(tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))@misc{dau2024xmainframelargelanguagemodel,
title={XMainframe: A Large Language Model for Mainframe Modernization},
author={Anh T. V. Dau and Hieu Trung Dao and Anh Tuan Nguyen and Hieu Trung Tran and Phong X. Nguyen and Nghi D. Q. Bui},
year={2024},
eprint={2408.04660},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2408.04660},
}