Text Generation
Transformers
PyTorch
Portuguese
llama
portuguese
brazilian
causal-lm
text-generation-inference
Instructions to use elvisia/nbr-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use elvisia/nbr-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="elvisia/nbr-1b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("elvisia/nbr-1b") model = AutoModelForCausalLM.from_pretrained("elvisia/nbr-1b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use elvisia/nbr-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "elvisia/nbr-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "elvisia/nbr-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/elvisia/nbr-1b
- SGLang
How to use elvisia/nbr-1b 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 "elvisia/nbr-1b" \ --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": "elvisia/nbr-1b", "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 "elvisia/nbr-1b" \ --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": "elvisia/nbr-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use elvisia/nbr-1b with Docker Model Runner:
docker model run hf.co/elvisia/nbr-1b
Fix: correct LLaMA weight mapping
Browse files- config.json +4 -1
- pytorch_model.bin +2 -2
config.json
CHANGED
|
@@ -13,5 +13,8 @@
|
|
| 13 |
"rms_norm_eps": 1e-05,
|
| 14 |
"rope_theta": 10000.0,
|
| 15 |
"torch_dtype": "bfloat16",
|
| 16 |
-
"
|
|
|
|
|
|
|
|
|
|
| 17 |
}
|
|
|
|
| 13 |
"rms_norm_eps": 1e-05,
|
| 14 |
"rope_theta": 10000.0,
|
| 15 |
"torch_dtype": "bfloat16",
|
| 16 |
+
"tie_word_embeddings": false,
|
| 17 |
+
"bos_token_id": 1,
|
| 18 |
+
"eos_token_id": 2,
|
| 19 |
+
"pad_token_id": 3
|
| 20 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9574cd4d73f69ca63f072acd4e19144c6dca6157d47cc07109df1db0a7ec2411
|
| 3 |
+
size 4515641019
|