Downloads · 30 days
0
TheBug95/llama-3.2-1B-MS-MARCO-QLoRA-v2
llama-3.2-1B-MS-MARCO-QLoRA-v2 is a machine learning model from TheBug95. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
Este modelo es una versión afinada del modelo meta-llama/Llama-3.2-1B utilizando el conjunto de datos MS MARCO para tareas de generación de respuestas.
Downloads · 30 days
0
Access
Public
Updated Nov 5, 2024
Repo size
107 MB
Likes
0
Public
Click a slice to open those files.
.safetensors90.2 MB · 84%
From the Hugging Face model README
Este modelo es una versión afinada del modelo meta-llama/Llama-3.2-1B utilizando el conjunto de datos MS MARCO para tareas de generación de respuestas.

Para utilizar este modelo, puedes cargarlo de la siguiente manera:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('TheBug95/llama-3.2-1B-MS-MARCO-QLoRA-v3')
tokenizer = AutoTokenizer.from_pretrained('TheBug95/llama-3.2-1B-MS-MARCO-QLoRA-v3')
#Ejemplo de Generación
def generate_answer(prompt):
inputs = tokenizer(prompt, return_tensors='pt').to(device)
outputs = model.generate(**inputs, max_length=512, do_sample=True, temperature=0.7)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
return answer
# Ejemplo de uso
prompt = 'Context:
[Tu contexto aquí]
Question:
[Tu pregunta aquí]
Answer:'
respuesta = generate_answer(prompt)
print(respuesta)
1- MS MARCO Dataset:
@misc{bajaj2018msmarcohumangenerated,
title={MS MARCO: A Human Generated MAchine Reading COmprehension Dataset},
author={Payal Bajaj and Daniel Campos and Nick Craswell and Li Deng and Jianfeng Gao and Xiaodong Liu and Rangan Majumder and Andrew McNamara and Bhaskar Mitra and Tri Nguyen and Mir Rosenberg and Xia Song and Alina Stoica and Saurabh Tiwary and Tong Wang},
year={2018},
eprint={1611.09268},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/1611.09268},
}
2- QLoRA Paper:
@misc{dettmers2023qloraefficientfinetuningquantized,
title={QLoRA: Efficient Finetuning of Quantized LLMs},
author={Tim Dettmers and Artidoro Pagnoni and Ari Holtzman and Luke Zettlemoyer},
year={2023},
eprint={2305.14314},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2305.14314},
}
3- PEFT Library
4- LoRA Paper:
@misc{hu2021loralowrankadaptationlarge,
title={LoRA: Low-Rank Adaptation of Large Language Models},
author={Edward J. Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen},
year={2021},
eprint={2106.09685},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2106.09685},
}