Text Generation
Transformers
PyTorch
Catalan
Spanish
English
llama
finetune
chatml
gpt4
catalan
text-generation-inference
Instructions to use xaviviro/FLAMA-0.5-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xaviviro/FLAMA-0.5-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xaviviro/FLAMA-0.5-3B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xaviviro/FLAMA-0.5-3B") model = AutoModelForCausalLM.from_pretrained("xaviviro/FLAMA-0.5-3B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xaviviro/FLAMA-0.5-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xaviviro/FLAMA-0.5-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xaviviro/FLAMA-0.5-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/xaviviro/FLAMA-0.5-3B
- SGLang
How to use xaviviro/FLAMA-0.5-3B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "xaviviro/FLAMA-0.5-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xaviviro/FLAMA-0.5-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "xaviviro/FLAMA-0.5-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xaviviro/FLAMA-0.5-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use xaviviro/FLAMA-0.5-3B with Docker Model Runner:
docker model run hf.co/xaviviro/FLAMA-0.5-3B
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: openlm-research/open_llama_3b_v2
|
| 4 |
+
datasets:
|
| 5 |
+
- xaviviro/oasst2_ca_gpt
|
| 6 |
+
- xaviviro/oasst2_es_gpt
|
| 7 |
+
tags:
|
| 8 |
+
- finetune
|
| 9 |
+
- chatml
|
| 10 |
+
- gpt4
|
| 11 |
+
- catalan
|
| 12 |
+
model-index:
|
| 13 |
+
- name: FLAMA-0.5-3B
|
| 14 |
+
results: []
|
| 15 |
+
library_name: transformers
|
| 16 |
+
widget:
|
| 17 |
+
- text: "<|im_start|>user\n Qui va ser Isaac Newton?<|im_end|>\n<|im_start|>assistant\n"
|
| 18 |
+
- text: "<|im_start|>user\n Quien fué ser Isaac Newton?<|im_end|>\n<|im_start|>assistant\n"
|
| 19 |
+
language:
|
| 20 |
+
- ca
|
| 21 |
+
- es
|
| 22 |
+
- en
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# FLAMA: Model 3B ChatML en Català i Castellà. Versió 0.5
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
|
| 29 |
+
## Novetats de la versió 0.5
|
| 30 |
+
|
| 31 |
+
1. Català millorat
|
| 32 |
+
1. Afegit el Castellà
|
| 33 |
+
|
| 34 |
+
FLAMA és el primer model petit 3B bilingüe en català i castellà. És el resultat de finetunejar el model [open_llama_3b_v2](/openlm-research/open_llama_3b_v2) amb les instruccions d'[OpenAssistant v2](/datasets/OpenAssistant/oasst2) traduïdes automàticament al català i al castellà amb recursos de [Helsinki-NLP](/Helsinki-NLP) i tractades en format ChatML.
|
| 35 |
+
|
| 36 |
+
👉🏻 [Format GGUF i quantitzat](/xaviviro/FLAMA-0.5-3B-GGUF)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
# Prompt Template
|
| 40 |
+
|
| 41 |
+
FLAMA usa ChatML com a prompt template:
|
| 42 |
+
|
| 43 |
+
```
|
| 44 |
+
<|im_start|>user
|
| 45 |
+
Qui va ser Isaac Newton?<|im_end|>
|
| 46 |
+
<|im_start|>assistant\n
|
| 47 |
+
```
|
| 48 |
+
```
|
| 49 |
+
<|im_start|>user
|
| 50 |
+
Quien fué Isaac Newton?<|im_end|>
|
| 51 |
+
<|im_start|>assistant\n
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
| 55 |
+
|
| 56 |
+
## Referències
|
| 57 |
+
|
| 58 |
+
```
|
| 59 |
+
@software{xaviviro2023flama,
|
| 60 |
+
author = {xaviviro},
|
| 61 |
+
title = {FLAMA: Model 3B ChatML en Català. Versió 0.5},
|
| 62 |
+
month = January,
|
| 63 |
+
year = 2024,
|
| 64 |
+
url = {https://huggingface.co/xaviviro/FLAMA-0.5-3B}
|
| 65 |
+
}
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
@software{openlm2023openllama,
|
| 70 |
+
author = {Geng, Xinyang and Liu, Hao},
|
| 71 |
+
title = {OpenLLaMA: An Open Reproduction of LLaMA},
|
| 72 |
+
month = May,
|
| 73 |
+
year = 2023,
|
| 74 |
+
url = {https://github.com/openlm-research/open_llama}
|
| 75 |
+
}
|
| 76 |
+
```
|
| 77 |
+
```
|
| 78 |
+
@software{together2023redpajama,
|
| 79 |
+
author = {Together Computer},
|
| 80 |
+
title = {RedPajama-Data: An Open Source Recipe to Reproduce LLaMA training dataset},
|
| 81 |
+
month = April,
|
| 82 |
+
year = 2023,
|
| 83 |
+
url = {https://github.com/togethercomputer/RedPajama-Data}
|
| 84 |
+
}
|
| 85 |
+
```
|
| 86 |
+
```
|
| 87 |
+
@article{touvron2023llama,
|
| 88 |
+
title={Llama: Open and efficient foundation language models},
|
| 89 |
+
author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and others},
|
| 90 |
+
journal={arXiv preprint arXiv:2302.13971},
|
| 91 |
+
year={2023}
|
| 92 |
+
}
|
| 93 |
+
```
|