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") 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
- 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
Upload LlamaForCausalLM
Browse files- README.md +8 -9
- config.json +1 -1
- generation_config.json +1 -1
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
README.md
CHANGED
|
@@ -1,29 +1,28 @@
|
|
| 1 |
---
|
| 2 |
-
license: llama2
|
| 3 |
-
datasets:
|
| 4 |
-
- ju-resplande/rebel-pt
|
| 5 |
-
- paulofinardi/OIG_small_chip2_portuguese_brasil
|
| 6 |
-
- Guilherme34/Cabrita-lora-ptbr
|
| 7 |
-
- dominguesm/Canarim-Instruct-PTBR-Dataset
|
| 8 |
language:
|
| 9 |
- pt
|
| 10 |
- en
|
| 11 |
-
|
| 12 |
library_name: transformers
|
| 13 |
tags:
|
| 14 |
- llama
|
| 15 |
- peft
|
| 16 |
- portuguese
|
| 17 |
- instruct
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
model-index:
|
| 20 |
- name: boana-7b-instruct
|
| 21 |
results:
|
| 22 |
- task:
|
| 23 |
type: text-generation
|
| 24 |
dataset:
|
| 25 |
-
type: Muennighoff/xwinograd
|
| 26 |
name: XWinograd (pt)
|
|
|
|
| 27 |
config: pt
|
| 28 |
split: test
|
| 29 |
metrics:
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- pt
|
| 4 |
- en
|
| 5 |
+
license: llama2
|
| 6 |
library_name: transformers
|
| 7 |
tags:
|
| 8 |
- llama
|
| 9 |
- peft
|
| 10 |
- portuguese
|
| 11 |
- instruct
|
| 12 |
+
datasets:
|
| 13 |
+
- ju-resplande/rebel-pt
|
| 14 |
+
- paulofinardi/OIG_small_chip2_portuguese_brasil
|
| 15 |
+
- Guilherme34/Cabrita-lora-ptbr
|
| 16 |
+
- dominguesm/Canarim-Instruct-PTBR-Dataset
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
model-index:
|
| 19 |
- name: boana-7b-instruct
|
| 20 |
results:
|
| 21 |
- task:
|
| 22 |
type: text-generation
|
| 23 |
dataset:
|
|
|
|
| 24 |
name: XWinograd (pt)
|
| 25 |
+
type: Muennighoff/xwinograd
|
| 26 |
config: pt
|
| 27 |
split: test
|
| 28 |
metrics:
|
config.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
-
"transformers_version": "4.
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
|
|
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.39.2",
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
generation_config.json
CHANGED
|
@@ -6,5 +6,5 @@
|
|
| 6 |
"pad_token_id": 0,
|
| 7 |
"temperature": 0.6,
|
| 8 |
"top_p": 0.9,
|
| 9 |
-
"transformers_version": "4.
|
| 10 |
}
|
|
|
|
| 6 |
"pad_token_id": 0,
|
| 7 |
"temperature": 0.6,
|
| 8 |
"top_p": 0.9,
|
| 9 |
+
"transformers_version": "4.39.2"
|
| 10 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4938985352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:715d938743b2d99e2d99fa504364988d4a971884637abfae5231a000c2d8d34e
|
| 3 |
size 4938985352
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4947390880
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1cb99983059ee5adce8d49122dd1ec829e49b6dcd1e697ac206649191ac9b1d
|
| 3 |
size 4947390880
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3590488816
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f720bad6feb83db18964d074cd2b095b96e6c2742d62a1232b925f56fd6ff154
|
| 3 |
size 3590488816
|