Instructions to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rhaymison/Mistral-portuguese-luana-7b-f16-gguf", dtype="auto") - llama-cpp-python
How to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="rhaymison/Mistral-portuguese-luana-7b-f16-gguf", filename="Mistral-portuguese-luana-7b-f16-gguf.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16 # Run inference directly in the terminal: llama-cli -hf rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16 # Run inference directly in the terminal: llama-cli -hf rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
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 rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16 # Run inference directly in the terminal: ./llama-cli -hf rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
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 rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
Use Docker
docker model run hf.co/rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
- LM Studio
- Jan
- Ollama
How to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with Ollama:
ollama run hf.co/rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
- Unsloth Studio
How to use rhaymison/Mistral-portuguese-luana-7b-f16-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 rhaymison/Mistral-portuguese-luana-7b-f16-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 rhaymison/Mistral-portuguese-luana-7b-f16-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for rhaymison/Mistral-portuguese-luana-7b-f16-gguf to start chatting
- Docker Model Runner
How to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with Docker Model Runner:
docker model run hf.co/rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
- Lemonade
How to use rhaymison/Mistral-portuguese-luana-7b-f16-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull rhaymison/Mistral-portuguese-luana-7b-f16-gguf:F16
Run and chat with the model
lemonade run user.Mistral-portuguese-luana-7b-f16-gguf-F16
List all available models
lemonade list
Mistral portuguese luana 7b f16 GGUF
This GGUF model, derived from the Mixtrla Luana 7b, has been quantized in f16/half. The model was trained with a superset of 200,000 instructions in Portuguese, aiming to help fill the gap in models available in Portuguese. Tuned from the Mistral 7b, this model has been primarily adjusted for instructional tasks.
Remember that verbs are important in your prompt. Tell your model how to act or behave so that you can guide them along the path of their response. Important points like these help models (even smaller models like 7b) to perform much better.
!git lfs install
!pip install langchain
!pip install langchain-community langchain-core
!pip install llama-cpp-python
!git clone https://huggingface.co/rhaymison/Mistral-portuguese-luana-7b-f16-gguf
def llamacpp():
from langchain.llms import LlamaCpp
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
llm = LlamaCpp(
model_path="/content/Mistral-portuguese-luana-7b-f16-gguf.gguf",
n_gpu_layers=40,
n_batch=512,
verbose=True,
)
template = """<s>[INST] Abaixo está uma instrução que descreve uma tarefa, juntamente com uma entrada que fornece mais contexto.
Escreva uma resposta que complete adequadamente o pedido.
### {question}
[/INST]"""
prompt = PromptTemplate(template=template, input_variables=["question"])
llm_chain = LLMChain(prompt=prompt, llm=llm)
question = "instrução: aja como um professor de matemática e me explique porque 2 + 2 = 4?"
response = llm_chain.run({"question": question})
print(response)
Output:
Como professor de matemática, posso explicar que 2 + 2 = 4 é uma regra fundamental na matemática.
Essa equação segue as propriedades da adição e de equivalência, como o princípio da idempotência (que diz que um elemento ou operador não altera nada se repetir), entre outras regras.
Assim, a equação 2 + 2 = 4 segue as propriedades fundamentais da adição na matemática, e é uma regra básica que toda criança deve aprender.
Comments
Any idea, help or report will always be welcome.
email: rhaymisoncristian@gmail.com
- Downloads last month
- 15
16-bit
Model tree for rhaymison/Mistral-portuguese-luana-7b-f16-gguf
Base model
mistralai/Mistral-7B-Instruct-v0.2