Views
No views yet
1
2# Load model directly
3from transformers import AutoTokenizer, AutoModelForCausalLM
4
5tokenizer = AutoTokenizer.from_pretrained("vitormesaque/i-llama")
6model = AutoModelForCausalLM.from_pretrained("vitormesaque/i-llama")
71
2
3FastLanguageModel.for_inference(model) # Enable native 2x faster inference
4inputs = tokenizer(
5[
6 irisk_prompt.format(
7 "Extract issues from the user review in JSON format. For each issue, provide label, functionality, severity (1-5), likelihood (1-5), category (Bug, User Experience, Performance, Security, Compatibility, Functionality, UI, Connectivity, Localization, Accessibility, Data Handling, Privacy, Notifications, Account Management, Payment, Content Quality, Support, Updates, Syncing, Customization), and the sentence.", # instruction
8 "I used to love this app, but now it's become frustrating as hell. We can't see lyrics, we can't CHOOSE WHAT SONG WE WANT TO LISTEN TO, we can't skip a song more than a few times, there are ads after every two songs, and all in all it's a horrible overrated app. If I could give this 0 stars, I would.", # input
9 "", # output - leave this blank for generation!
10 )
11], return_tensors = "pt").to("cuda")
12
13
14from transformers import TextStreamer
15text_streamer = TextStreamer(tokenizer)
16_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 512)
17
181@misc{vitormesaque2024llama3,
2 author = {Vitor Mesaque Alves de Lima},
3 title = {iLLAMA: LLM for App Issue Detection and Prioritization Obtained by Fine-Tuning LLAMA 3},
4 year = {2024},
5 url = {https://huggingface.co/vitormesaque}
6}