Text Generation
Transformers
PyTorch
Safetensors
Portuguese
llama
LLM
Portuguese
Llama 2
Eval Results (legacy)
text-generation-inference
Instructions to use dominguesm/canarim-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dominguesm/canarim-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dominguesm/canarim-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dominguesm/canarim-7b") model = AutoModelForCausalLM.from_pretrained("dominguesm/canarim-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dominguesm/canarim-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dominguesm/canarim-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dominguesm/canarim-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dominguesm/canarim-7b
- SGLang
How to use dominguesm/canarim-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 "dominguesm/canarim-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": "dominguesm/canarim-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 "dominguesm/canarim-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": "dominguesm/canarim-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dominguesm/canarim-7b with Docker Model Runner:
docker model run hf.co/dominguesm/canarim-7b
Commit ·
f4789cb
1
Parent(s): 08fdd2b
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,6 +87,19 @@ sequences = pipe(
|
|
| 87 |
|
| 88 |
This code snippet demonstrates how to generate text with Canarim-7B. You can customize the input text and adjust parameters like `max_length` according to your requirements.
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
## License
|
| 91 |
|
| 92 |
Canarim-7B is released under the [LLAMA 2 COMMUNITY LICENSE AGREEMENT](https://ai.meta.com/llama/license/).
|
|
|
|
| 87 |
|
| 88 |
This code snippet demonstrates how to generate text with Canarim-7B. You can customize the input text and adjust parameters like `max_length` according to your requirements.
|
| 89 |
|
| 90 |
+
## Citation
|
| 91 |
+
|
| 92 |
+
If you want to cite **Canarim Instruct PTBR dataset**, you could use this:
|
| 93 |
+
|
| 94 |
+
@misc {maicon_domingues_2023,
|
| 95 |
+
author = { {Maicon Domingues} },
|
| 96 |
+
title = { canarim-7b (Revision 08fdd2b) },
|
| 97 |
+
year = 2023,
|
| 98 |
+
url = { https://huggingface.co/dominguesm/canarim-7b },
|
| 99 |
+
doi = { 10.57967/hf/1356 },
|
| 100 |
+
publisher = { Hugging Face }
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
## License
|
| 104 |
|
| 105 |
Canarim-7B is released under the [LLAMA 2 COMMUNITY LICENSE AGREEMENT](https://ai.meta.com/llama/license/).
|