Edit model card

Mistral portuguese luana 7b Q8 GUFF

This GGUF model, derived from the Mixtrla Luana 7b, has been quantized in Q8/8bits. 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-q8-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-q8-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:

Hoje, vamos resolver uma das questões mais básicas na matemática: "por que 2 + 2 = 4?"
Para entender por que 2 + 2 = 4, precisamos entender o conceito de adição.
A adição é a maneira de combinar dois ou mais números para formar um novo número chamado soma.
Neste caso, estamos adicionando dois números: 2 e 2.
Quando adicionamos 2 + 2, resultamos em uma soma de 4.
Portanto, por que 2 + 2 = 4?
Simplesmente porque somos adicionando dois números, 2 e 2, para formar um novo número chamado soma. E a soma de 2 + 2 é 4.

Comments

Any idea, help or report will always be welcome.

email: rhaymisoncristian@gmail.com

Downloads last month
34
GGUF
Model size
7.24B params
Architecture
llama
Unable to determine this model’s pipeline type. Check the docs .

Quantized from

Datasets used to train rhaymison/Mistral-portuguese-luana-7b-q8-gguf