Instructions to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf", dtype="auto") - llama-cpp-python
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf", filename="phi-3-portuguese-tom-cat-4k-instruct-q8-gguf.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-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/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf # Run inference directly in the terminal: llama-cli -hf rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf # Run inference directly in the terminal: llama-cli -hf rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
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/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf # Run inference directly in the terminal: ./llama-cli -hf rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
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/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf # Run inference directly in the terminal: ./build/bin/llama-cli -hf rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
Use Docker
docker model run hf.co/rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
- LM Studio
- Jan
- vLLM
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
- SGLang
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf 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 "rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf" \ --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": "rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf", "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 "rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf" \ --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": "rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with Ollama:
ollama run hf.co/rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
- Unsloth Studio
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-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/phi-3-portuguese-tom-cat-4k-instruct-q8-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/phi-3-portuguese-tom-cat-4k-instruct-q8-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/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf to start chatting
- Docker Model Runner
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with Docker Model Runner:
docker model run hf.co/rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
- Lemonade
How to use rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
Run and chat with the model
lemonade run user.phi-3-portuguese-tom-cat-4k-instruct-q8-gguf-{{QUANT_TAG}}List all available models
lemonade list
Phi3 portuguese tom cat 4k instruct GGUF
This GGUF model, derived from the Phi3 Tom cat 4k, has been quantized in q8. The model was trained with a superset of 300,000 instructions in Portuguese, aiming to help fill the gap in models available in Portuguese. Tuned from Phi3-4k, this model has been primarily adjusted for instructional tasks.
This model was trained with a superset of 300,000 instructions in Portuguese. The model comes to help fill the gap in models in Portuguese. Tuned from the microsoft/Phi-3-mini-4k.
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 4b) 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/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
def llamacpp():
from langchain.llms import LlamaCpp
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
llm = LlamaCpp(
model_path="/content/phi-3-portuguese-tom-cat-4k-instruct-q8-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)
Comments
Any idea, help or report will always be welcome.
email: rhaymisoncristian@gmail.com
- Downloads last month
- 25
We're not able to determine the quantization variants.
Model tree for rhaymison/phi-3-portuguese-tom-cat-4k-instruct-q8-gguf
Base model
microsoft/Phi-3-mini-4k-instruct