Instructions to use lucianosb/boto-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use lucianosb/boto-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="lucianosb/boto-7B-GGUF", filename="boto-7B-q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lucianosb/boto-7B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lucianosb/boto-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf lucianosb/boto-7B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lucianosb/boto-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf lucianosb/boto-7B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf lucianosb/boto-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf lucianosb/boto-7B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf lucianosb/boto-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf lucianosb/boto-7B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/lucianosb/boto-7B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use lucianosb/boto-7B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lucianosb/boto-7B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lucianosb/boto-7B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lucianosb/boto-7B-GGUF:Q4_K_M
- Ollama
How to use lucianosb/boto-7B-GGUF with Ollama:
ollama run hf.co/lucianosb/boto-7B-GGUF:Q4_K_M
- Unsloth Studio
How to use lucianosb/boto-7B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lucianosb/boto-7B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lucianosb/boto-7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lucianosb/boto-7B-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use lucianosb/boto-7B-GGUF with Docker Model Runner:
docker model run hf.co/lucianosb/boto-7B-GGUF:Q4_K_M
- Lemonade
How to use lucianosb/boto-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lucianosb/boto-7B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.boto-7B-GGUF-Q4_K_M
List all available models
lemonade list
File size: 6,878 Bytes
8cefe1a 57be3f7 8cefe1a 57be3f7 701347e 57be3f7 ddf7862 57be3f7 65b2aaa 57be3f7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | ---
inference: false
language:
- pt
model_creator: Luciano Santa Brígida
model_link: https://huggingface.co/lucianosb/boto-7B
model_name: Boto 7B
model_type: mistral
quantized_by: lucianosb
pipeline_tag: text-generation
license: apache-2.0
---
# Boto 7B - GGUF
- Criador do Modelo: [Luciano Santa Brígida](https://lucianosb.com.br/)
- Modelo Original: [Boto-7B](https://huggingface.co/lucianosb/boto-7B)
Boto-7B é um modelo de linguagem de 7 bilhões de parâmetros, otimizado a partir do Mistral-7B.
Confira os [presets](https://huggingface.co/lucianosb/boto-7B-GGUF/tree/main/presets) para usar com [LM Studio](https://lmstudio.ai/).
## Arquivos Incluídos
| Nome | Método Quant | Bits | Tamanho | Desc |
| ---- | ---- | ---- | ---- | ----- |
| [boto-7B-q2_k.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q2_k.gguf) | q2_K | 2 | 2.72 GB | Quantização em 2-bit. Significativa perda de qualidade. Não-recomendado. |
| [boto-7B-q3_k_m.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q3_k_m.gguf) | q3_K_M| 3 | 3.52 GB | Quantização em 3-bit. |
| [boto-7B-q3_k_s.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q3_k_s.gguf) | q3_K_S | 3 | 3.16 GB | Quantização em 3-bit. |
| [boto-7B-q4_0.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q4_0.gguf) | q4_0 | 4 | 4.11 GB | Quantização em 4-bit. Prefira usar o Q3_K_M|
| [boto-7B-q4_k_s.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q4_k_s.gguf) | q4_K_S | 4 | 4.14 GB | Quantização em 4-bit. |
| [boto-7B-q3_k_l.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q3_k_l.gguf) | q3_K_L | 3 | 3.82 GB | Quantização em 3-bit com menor perda de qualidade. |
| [boto-7B-q4_k_m.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q4_k_m.gguf) | q4_K_M | 4 | 4.37 GB | Quantização em 4-bit. |
| [boto-7B-q4_1.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q4_1.gguf) | q4_1 | 4 | 4.55 GB | Quantização em 4-bit. Acurácia maior que q4_0 mas não tão boa quanto q5_0. Inferência mais rápida que os modelos q5. |
| [boto-7B-q5_0.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q5_0.gguf) | q5_0 | 5 | 5 GB | Quantização em 5-bit. Melhor acurácia, maior uso de recursos, inferência mais lenta. |
| [boto-7B-q5_1.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q5_1.gguf) | q5_1 | 5 | 5.44 GB | Quantização em 5-bit. Ainda Melhor acurácia, maior uso de recursos, inferência mais lenta. |
| [boto-7B-q5_k_m.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q5_k_m.gguf) | q5_K_M | 5 | 5.13 GB | Quantização em 5-bit. Melhor performance. Recomendado. |
| [boto-7B-q5_k_s.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q5_k_s.gguf) | q5_K_S | 5 | 5 GB | Quantização em 5-bit. |
| [boto-7B-q6_k.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q6_k.gguf) | q6_K | 6 | 5.94 GB | Quantização em 6-bit. |
| [boto-7B-q8_0.gguf](https://huggingface.co/lucianosb/boto-7B-GGUF/blob/main/boto-7B-q8_0.gguf) | q8_0 | 8 | 7.7 GB | Quantização em 8-bit. Quase indistinguível do float16. Usa muitos recursos e é mais lento. |
**Observação**: os valores de RAM acima não pressupõem descarregamento de GPU. Se as camadas forem descarregadas para a GPU, isso reduzirá o uso de RAM e usará VRAM.
## Como executar com `llama.cpp`
Usei o seguinte comando. Para melhores resultados forneça exemplos de resultados esperados. Exemplo:
> Conte a história do Curupira
```
./main -m ./models/boto-7B-GGUF/boto-7B-q5_k_m.gguf --color --temp 0.5 -n 256 -p "### Instruções: {comando} ### Resposta:"
```
Para compreender os parâmetros, veja [a documentação do llama.cpp](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
Experimente no Google Colab: [](https://colab.research.google.com/github/lucianosb/boto-notebooks/blob/main/boto-7B/boto_7b_llamacpp_5_k_m.ipynb)
## Sobre o formato GGUF
GGUF é um novo formato introduzido pela equipe llama.cpp em 21 de agosto de 2023. É um substituto para o GGML, que não é mais suportado pelo llama.cpp.
O principal benefício do GGUF é que ele é um formato extensível e à prova de futuro que armazena mais informações sobre o modelo como metadados. Ele também inclui código de tokenização significativamente melhorado, incluindo pela primeira vez suporte total para tokens especiais. Isso deve melhorar o desempenho, especialmente com modelos que usam novos tokens especiais e implementam modelos de prompt personalizados.
Aqui está uma lista de clientes e bibliotecas que são conhecidos por suportar GGUF:
- [llama.cpp](https://github.com/ggerganov/llama.cpp).
- [ollama](https://ollama.ai/) - servidor com interfaces REST e CLI
- [Faraday.dev](https://faraday.dev/) - App para Windows e Mac
- [lollms-webui](https://github.com/ParisNeo/lollms-webui) - Lord of Large Language Models Web User Interface
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui), a interface web mais amplamente utilizada. Suporta GGUF com aceleração GPU via backend ctransformers - backend llama-cpp-python deve funcionar em breve também.
- [KoboldCpp](https://github.com/LostRuins/koboldcpp), agora suporta GGUF a partir da versão 1.41! Uma poderosa interface web GGML, com aceleração total da GPU. Especialmente bom para contar histórias.
- [LM Studio](https://lmstudio.ai), versão 0.2.2 e posteriores suportam GGUF. Uma GUI local totalmente equipada com aceleração GPU em ambos Windows (NVidia e AMD) e macOS.
- [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), agora deve funcionar, escolha o backend c_transformers. Uma ótima interface web com muitos recursos interessantes. Suporta aceleração GPU CUDA.
- [ctransformers](https://github.com/marella/ctransformers), agora suporta GGUF a partir da versão 0.2.24! Uma biblioteca Python com aceleração GPU, suporte LangChain e servidor AI compatível com OpenAI.
- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), suporta GGUF a partir da versão 0.1.79. Uma biblioteca Python com aceleração GPU, suporte LangChain e servidor API compatível com OpenAI.
- [candle](https://github.com/huggingface/candle), adicionou suporte GGUF em 22 de agosto. Candle é um framework ML Rust com foco em desempenho, incluindo suporte GPU e facilidade de uso.
- [LocalAI](https://github.com/go-skynet/LocalAI), adicionou suporte GGUF em 23 de agosto. LocalAI provê uma API Rest para modelos LLM e de geração de imagens.
- [Jan](https://github.com/janhq/jan), similar ao LM Studio, porém complemetamente open-source
## Template
````
### Instrução:
{prompt}
### Resposta:
````
|