Instructions to use maritaca-ai/sabia-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use maritaca-ai/sabia-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="maritaca-ai/sabia-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("maritaca-ai/sabia-7b") model = AutoModelForCausalLM.from_pretrained("maritaca-ai/sabia-7b") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use maritaca-ai/sabia-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maritaca-ai/sabia-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maritaca-ai/sabia-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/maritaca-ai/sabia-7b
- SGLang
How to use maritaca-ai/sabia-7b 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 "maritaca-ai/sabia-7b" \ --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": "maritaca-ai/sabia-7b", "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 "maritaca-ai/sabia-7b" \ --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": "maritaca-ai/sabia-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use maritaca-ai/sabia-7b with Docker Model Runner:
docker model run hf.co/maritaca-ai/sabia-7b
Instruction tuning format
Hi, could you provide the instruction tuning text format you used for the tasks/benchmarks?
Hi @vabatista , this model was trained only on a next-token prediction task, it wasn't finetuned to follow instructions. Therefore, it will only work if you include few-shot examples in the prompt.
Thanks for quick answer!
Could you provide a snippet of text you used to assess, for instance, the faquad benchmark?
This one was used for Faquad:
Answer the question based on the context.
Example 1:
Context: Complementary rules for registration renewal. In the online course selection stage, the student must fill out an electronic form, through the Academic System (Siscad),
indicating the subjects he intends to take in the subsequent academic period, respecting the prerequisites and the compatibility of class schedules of the selected subjects.
Place priority is not guaranteed to students who have attended any prerequisites in the immediately preceding summer or winter term or who, for any reason, do not select
the respective subject(s) at this stage of the registration renewal.
Question: Which subjects must the academic fill in the electronic form?
Answer: subjects he intends to take in the subsequent academic period
###
Example 2:
Context: ...
Question: ...
Answer: ...
###
Example 3:
Context: ...
Question: ...
Answer:
In case you want to check for more examples, see appendix A of the paper https://arxiv.org/pdf/2304.07880v3.pdf
Closing this for now but please let me know if you need any other information.