--- library_name: transformers license: mit datasets: - OpenAssistant/oasst1 language: - en - es base_model: - EleutherAI/gpt-neo-125m --- # Model Card for Aconoya/Nono_instruct_neo-125m_dpo Este modelo es parte de nuestro esfuerzo por dar acceso a la IA en Español a todas las personas y no sólo a aquellos con un celular de gama alta o una computadora poderosa. Creado usando gpt-neo-125m por EleutherAI como modelo base y el conjunto de datos conversacional del proyeto OpenAssistant (oasst1) para adaptarlo al formato de instrucciones. -This model is part of an effort to make AI accessible in Spanish to everyone, not just those with high-end smartphones or powerful computers.- ## Model Details ### Model Description - **Developed by:** [Javier R. García](https://huggingface.co/jr-garcia) - **Language(s) (NLP):** English, Spanish - **License:** MIT - **Finetuned from:** gpt-neo-125m by EleutherAI ## Uses Text generation. ## How to Get Started with the Model Use the code below to get started with the model. ```python from transformers import AutoModelForCausalLM, AutoConfig, AutoTokenizer import torch device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model_name = "Aconoya/Nono_instruct_neo-125m_dpo" model = AutoModelForCausalLM.from_pretrained(model_name) model.gradient_checkpointing_enable() model = model.to(device.type) tokenizer = AutoTokenizer.from_pretrained(model_name) tokenizer.pad_token = tokenizer.eos_token ender_string = '' system_string='' user_string='' assistant_string='' prompt = ['Hello! How are you?', '¡Hola!, ¿Cómo estás?', '¿Qué es un perro?', 'What is a dog?'] prompt = choice(prompt) formatted_prompt = system_string + 'You are a digital assistant.' + ender_string + '\n' + user_string + prompt + ender_string + '\n' + assistant_string model_input = tokenizer.encode(formatted_prompt, return_tensors='pt').to(device) generated_ids = model.generate(input_ids=model_input, pad_token_id=tokenizer.eos_token_id, max_new_tokens=50) generated_text = tokenizer.decode(generated_ids[:, model_input.shape[-1]:][0], skip_special_tokens=True) print('Prompt:', prompt) print("Response: '{}'".format(generated_text)) ``` ## Training Details ### Training Data The model was trained using the conversational dataset from the OpenAssistant project (oasst1). ## Technical Specifications. The model was trained using [Kaggle.com](https://www.kaggle.com/) free services.