Text Generation
Transformers
Safetensors
PEFT
Portuguese
llama
portuguese
instruct
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use lrds-code/boana-7b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lrds-code/boana-7b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lrds-code/boana-7b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lrds-code/boana-7b-instruct") model = AutoModelForCausalLM.from_pretrained("lrds-code/boana-7b-instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use lrds-code/boana-7b-instruct with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lrds-code/boana-7b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lrds-code/boana-7b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lrds-code/boana-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lrds-code/boana-7b-instruct
- SGLang
How to use lrds-code/boana-7b-instruct 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 "lrds-code/boana-7b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lrds-code/boana-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "lrds-code/boana-7b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lrds-code/boana-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lrds-code/boana-7b-instruct with Docker Model Runner:
docker model run hf.co/lrds-code/boana-7b-instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,13 +23,13 @@ tags:
|
|
| 23 |
|
| 24 |
<hr>
|
| 25 |
|
| 26 |
-
# Boana-7B
|
| 27 |
|
| 28 |
<p align="center">
|
| 29 |
<img width="250" alt="Boana Logo" src="https://cdn-uploads.huggingface.co/production/uploads/658c21f4c1229bf113295773/_Dc6z1IAL-zUiy0LMSSqf.png">
|
| 30 |
</p>
|
| 31 |
|
| 32 |
-
Boana-7B é um LLM treinado em dados da língua portuguesa. O modelo é baseado no [LLaMA2-7B](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), uma versão de 7B de parâmetros do LLaMA-2. O projeto Boana tem como objetivo oferecer opções de LLM em língua portuguesa, ao mesmo tempo que disponibiliza um modelo menos complexo para que, dessa forma, usuários com menos poder computacional possam usufruir das LLMs.
|
| 33 |
|
| 34 |
Em apoio aos países de língua portuguesa.
|
| 35 |
|
|
@@ -69,8 +69,8 @@ def GeneratePrompt(input, instruction):
|
|
| 69 |
model_config = GenerationConfig.from_model_config(model.generation_config)
|
| 70 |
model.generation_config.temperature = 0.9 # Você pode variar esse valor entre 0 e 1.
|
| 71 |
|
| 72 |
-
model = AutoModelForCausalLM.from_pretrained('lrds-code/boana-7b')
|
| 73 |
-
tokenizer = AutoTokenizer.from_pretrained('lrds-code/boana-7b')
|
| 74 |
|
| 75 |
instruction = 'Como desenvolver habilidades de programação em python?'
|
| 76 |
text = GeneratePrompt(input='', instruction=instruction)
|
|
@@ -108,15 +108,15 @@ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
| 108 |
<hr>
|
| 109 |
|
| 110 |
|
| 111 |
-
# Boana-7B
|
| 112 |
|
| 113 |
<p align="center">
|
| 114 |
<img width="250" alt="Boana Logo" src="https://cdn-uploads.huggingface.co/production/uploads/658c21f4c1229bf113295773/_Dc6z1IAL-zUiy0LMSSqf.png">
|
| 115 |
</p>
|
| 116 |
|
| 117 |
-
Boana-7B is an LLM trained on portuguese language data. The model is based on [LLaMA2-7B](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), a 7B parameter version of LLaMA-2. The LLM Boana project aims to provide more LLM options in portuguese, while also providing less complex models so that users with less computational power can take advantage of the LLMs.
|
| 118 |
|
| 119 |
-
In support of portuguese-speaking countries
|
| 120 |
|
| 121 |
<p align="center">
|
| 122 |
<img width="250" alt="Countries Logo" src="https://cdn-uploads.huggingface.co/production/uploads/658c21f4c1229bf113295773/d3twZrXng5eDjg_LbH4pF.png">
|
|
@@ -154,8 +154,8 @@ def GeneratePrompt(input, instruction):
|
|
| 154 |
model_config = GenerationConfig.from_model_config(model.generation_config)
|
| 155 |
model.generation_config.temperature = 0.9 # You can vary this value between 0 and 1.
|
| 156 |
|
| 157 |
-
model = AutoModelForCausalLM.from_pretrained('lrds-code/boana-7b')
|
| 158 |
-
tokenizer = AutoTokenizer.from_pretrained('lrds-code/boana-7b')
|
| 159 |
|
| 160 |
instruction = 'Como desenvolver habilidades de programação em python?'
|
| 161 |
text = GeneratePrompt(input='', instruction=instruction)
|
|
|
|
| 23 |
|
| 24 |
<hr>
|
| 25 |
|
| 26 |
+
# Boana-7B-Instruct
|
| 27 |
|
| 28 |
<p align="center">
|
| 29 |
<img width="250" alt="Boana Logo" src="https://cdn-uploads.huggingface.co/production/uploads/658c21f4c1229bf113295773/_Dc6z1IAL-zUiy0LMSSqf.png">
|
| 30 |
</p>
|
| 31 |
|
| 32 |
+
Boana-7B-Instruct é um LLM treinado em dados da língua portuguesa. O modelo é baseado no [LLaMA2-7B](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), uma versão de 7B de parâmetros do LLaMA-2. O projeto Boana tem como objetivo oferecer opções de LLM em língua portuguesa, ao mesmo tempo que disponibiliza um modelo menos complexo para que, dessa forma, usuários com menos poder computacional possam usufruir das LLMs.
|
| 33 |
|
| 34 |
Em apoio aos países de língua portuguesa.
|
| 35 |
|
|
|
|
| 69 |
model_config = GenerationConfig.from_model_config(model.generation_config)
|
| 70 |
model.generation_config.temperature = 0.9 # Você pode variar esse valor entre 0 e 1.
|
| 71 |
|
| 72 |
+
model = AutoModelForCausalLM.from_pretrained('lrds-code/boana-7b-instruct')
|
| 73 |
+
tokenizer = AutoTokenizer.from_pretrained('lrds-code/boana-7b-instruct')
|
| 74 |
|
| 75 |
instruction = 'Como desenvolver habilidades de programação em python?'
|
| 76 |
text = GeneratePrompt(input='', instruction=instruction)
|
|
|
|
| 108 |
<hr>
|
| 109 |
|
| 110 |
|
| 111 |
+
# Boana-7B-Instruct
|
| 112 |
|
| 113 |
<p align="center">
|
| 114 |
<img width="250" alt="Boana Logo" src="https://cdn-uploads.huggingface.co/production/uploads/658c21f4c1229bf113295773/_Dc6z1IAL-zUiy0LMSSqf.png">
|
| 115 |
</p>
|
| 116 |
|
| 117 |
+
Boana-7B-Instruct is an LLM trained on portuguese language data. The model is based on [LLaMA2-7B](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), a 7B parameter version of LLaMA-2. The LLM Boana project aims to provide more LLM options in portuguese, while also providing less complex models so that users with less computational power can take advantage of the LLMs.
|
| 118 |
|
| 119 |
+
In support of portuguese-speaking countries.
|
| 120 |
|
| 121 |
<p align="center">
|
| 122 |
<img width="250" alt="Countries Logo" src="https://cdn-uploads.huggingface.co/production/uploads/658c21f4c1229bf113295773/d3twZrXng5eDjg_LbH4pF.png">
|
|
|
|
| 154 |
model_config = GenerationConfig.from_model_config(model.generation_config)
|
| 155 |
model.generation_config.temperature = 0.9 # You can vary this value between 0 and 1.
|
| 156 |
|
| 157 |
+
model = AutoModelForCausalLM.from_pretrained('lrds-code/boana-7b-instruct')
|
| 158 |
+
tokenizer = AutoTokenizer.from_pretrained('lrds-code/boana-7b-instruct')
|
| 159 |
|
| 160 |
instruction = 'Como desenvolver habilidades de programação em python?'
|
| 161 |
text = GeneratePrompt(input='', instruction=instruction)
|