|
Download README.md from Clectif/mistral-arenera: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/Clectif/mistral-arenera/resolve/main/README.md
- Command line
-
hf download hf://Clectif/mistral-arenera/README.md
-
curl -L -o README.md https://huggingface.co/Clectif/mistral-arenera/resolve/main/README.md
1.29 kB
| cat > /workspace/fine-tuning/clean-model/README.md << 'EOL' | |
| # Modelo Arenera - Mistral 7B Instruct Fine-tuned (LoRA) | |
| Este modelo es un adaptador LoRA entrenado sobre mistralai/Mistral-7B-Instruct-v0.2 para responder preguntas sobre procesos de explotación en la arenera Hato Viejo. | |
| ## Detalles del modelo | |
| - **Modelo base:** mistralai/Mistral-7B-Instruct-v0.2 | |
| - **Método de entrenamiento:** LoRA (Low-Rank Adaptation) | |
| - **Parámetros LoRA:** r=16, alpha=32 | |
| ## Uso del modelo | |
| Para usar este adaptador LoRA: | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| from peft import PeftModel | |
| # Cargar el modelo base | |
| base_model = AutoModelForCausalLM.from_pretrained( | |
| "mistralai/Mistral-7B-Instruct-v0.2", | |
| device_map="auto", | |
| trust_remote_code=True | |
| ) | |
| # Cargar el adaptador LoRA | |
| model = PeftModel.from_pretrained( | |
| base_model, | |
| "tu-usuario/mistral-arenera-lora" | |
| ) | |
| tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2") | |
| # Ejemplo de uso | |
| input_text = "¿Cuál es el objetivo principal del proceso de explotación en la arenera Hato Viejo?" | |
| inputs = tokenizer(input_text, return_tensors="pt").to(model.device) | |
| outputs = model.generate(**inputs, max_new_tokens=100) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) |