xaviviro/oasst2_euskera_gpt
Viewer • Updated • 13.3k • 15
How to use xaviviro/SUGARRA-3B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="xaviviro/SUGARRA-3B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("xaviviro/SUGARRA-3B")
model = AutoModelForCausalLM.from_pretrained("xaviviro/SUGARRA-3B")How to use xaviviro/SUGARRA-3B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "xaviviro/SUGARRA-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/SUGARRA-3B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/xaviviro/SUGARRA-3B
How to use xaviviro/SUGARRA-3B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "xaviviro/SUGARRA-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/SUGARRA-3B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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/SUGARRA-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/SUGARRA-3B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use xaviviro/SUGARRA-3B with Docker Model Runner:
docker model run hf.co/xaviviro/SUGARRA-3B
SUGARRA es el resultado de finetunear el modelo open_llama_3b_v2 con las instrucciones OpenAssistant v2 traducidas automáticamente al euskera usando recursos de Helsinki-NLP y tratadas en formato ChatML.
SUGARRA usa el prompt template ChatML:
<|im_start|>user
Nor zen Isaac Newton?<|im_end|>
<|im_start|>assistant\n
@software{xaviviro2024sugarra,
author = {xaviviro},
title = {SUGARRA: Modelo 3B experimental ChatML euskaldun.},
month = January,
year = 2024,
url = {https://huggingface.co/xaviviro/SUGARRA-3B}
}
@software{openlm2023openllama,
author = {Geng, Xinyang and Liu, Hao},
title = {OpenLLaMA: An Open Reproduction of LLaMA},
month = May,
year = 2023,
url = {https://github.com/openlm-research/open_llama}
}
@software{together2023redpajama,
author = {Together Computer},
title = {RedPajama-Data: An Open Source Recipe to Reproduce LLaMA training dataset},
month = April,
year = 2023,
url = {https://github.com/togethercomputer/RedPajama-Data}
}
@article{touvron2023llama,
title={Llama: Open and efficient foundation language models},
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},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}
Base model
openlm-research/open_llama_3b_v2