duyntnet / Mistral-Nemo-Instruct-2407-imatrix-GGUF

huggingface.co
Total runs: 872
24-hour runs: -86
7-day runs: -1.0K
30-day runs: -1.5K
Model's Last Updated: Tháng bảy 24 2024
text-generation

Introduction of Mistral-Nemo-Instruct-2407-imatrix-GGUF

Model Details of Mistral-Nemo-Instruct-2407-imatrix-GGUF

Quantizations of https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407

Inference Clients/UIs

From original readme

Usage

The model can be used with three different frameworks

Mistral Inference
Install

It is recommended to use mistralai/Mistral-Nemo-Instruct-2407 with mistral-inference . For HF transformers code snippets, please keep scrolling.

pip install mistral_inference
Download
from huggingface_hub import snapshot_download
from pathlib import Path

mistral_models_path = Path.home().joinpath('mistral_models', 'Nemo-Instruct')
mistral_models_path.mkdir(parents=True, exist_ok=True)

snapshot_download(repo_id="mistralai/Mistral-Nemo-Instruct-2407", allow_patterns=["params.json", "consolidated.safetensors", "tekken.json"], local_dir=mistral_models_path)
Chat

After installing mistral_inference , a mistral-chat CLI command should be available in your environment. You can chat with the model using

mistral-chat $HOME/mistral_models/Nemo-Instruct --instruct --max_tokens 256 --temperature 0.35

E.g. Try out something like:

How expensive would it be to ask a window cleaner to clean all windows in Paris. Make a reasonable guess in US Dollar.
Instruct following
from mistral_inference.transformer import Transformer
from mistral_inference.generate import generate

from mistral_common.tokens.tokenizers.mistral import MistralTokenizer
from mistral_common.protocol.instruct.messages import UserMessage
from mistral_common.protocol.instruct.request import ChatCompletionRequest

tokenizer = MistralTokenizer.from_file(f"{mistral_models_path}/tekken.json")
model = Transformer.from_folder(mistral_models_path)

prompt = "How expensive would it be to ask a window cleaner to clean all windows in Paris. Make a reasonable guess in US Dollar."

completion_request = ChatCompletionRequest(messages=[UserMessage(content=prompt)])

tokens = tokenizer.encode_chat_completion(completion_request).tokens

out_tokens, _ = generate([tokens], model, max_tokens=64, temperature=0.35, eos_id=tokenizer.instruct_tokenizer.tokenizer.eos_id)
result = tokenizer.decode(out_tokens[0])

print(result)
Function calling
from mistral_common.protocol.instruct.tool_calls import Function, Tool
from mistral_inference.transformer import Transformer
from mistral_inference.generate import generate

from mistral_common.tokens.tokenizers.mistral import MistralTokenizer
from mistral_common.protocol.instruct.messages import UserMessage
from mistral_common.protocol.instruct.request import ChatCompletionRequest


tokenizer = MistralTokenizer.from_file(f"{mistral_models_path}/tekken.json")
model = Transformer.from_folder(mistral_models_path)

completion_request = ChatCompletionRequest(
    tools=[
        Tool(
            function=Function(
                name="get_current_weather",
                description="Get the current weather",
                parameters={
                    "type": "object",
                    "properties": {
                        "location": {
                            "type": "string",
                            "description": "The city and state, e.g. San Francisco, CA",
                        },
                        "format": {
                            "type": "string",
                            "enum": ["celsius", "fahrenheit"],
                            "description": "The temperature unit to use. Infer this from the users location.",
                        },
                    },
                    "required": ["location", "format"],
                },
            )
        )
    ],
    messages=[
        UserMessage(content="What's the weather like today in Paris?"),
        ],
)

tokens = tokenizer.encode_chat_completion(completion_request).tokens

out_tokens, _ = generate([tokens], model, max_tokens=256, temperature=0.35, eos_id=tokenizer.instruct_tokenizer.tokenizer.eos_id)
result = tokenizer.decode(out_tokens[0])

print(result)
Transformers

NOTE: Until a new release has been made, you need to install transformers from source:

pip install git+https://github.com/huggingface/transformers.git

If you want to use Hugging Face transformers to generate text, you can do something like this.

from transformers import pipeline

messages = [
    {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
    {"role": "user", "content": "Who are you?"},
]
chatbot = pipeline("text-generation", model="mistralai/Mistral-Nemo-Instruct-2407")
chatbot(messages)

Unlike previous Mistral models, Mistral Nemo requires smaller temperatures. We recommend to use a temperature of 0.3.

Runs of duyntnet Mistral-Nemo-Instruct-2407-imatrix-GGUF on huggingface.co

872
Total runs
-86
24-hour runs
-449
3-day runs
-1.0K
7-day runs
-1.5K
30-day runs

More Information About Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co Model

More Mistral-Nemo-Instruct-2407-imatrix-GGUF license Visit here:

https://choosealicense.com/licenses/other

Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co

Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co is an AI model on huggingface.co that provides Mistral-Nemo-Instruct-2407-imatrix-GGUF's model effect (), which can be used instantly with this duyntnet Mistral-Nemo-Instruct-2407-imatrix-GGUF model. huggingface.co supports a free trial of the Mistral-Nemo-Instruct-2407-imatrix-GGUF model, and also provides paid use of the Mistral-Nemo-Instruct-2407-imatrix-GGUF. Support call Mistral-Nemo-Instruct-2407-imatrix-GGUF model through api, including Node.js, Python, http.

Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co Url

https://huggingface.co/duyntnet/Mistral-Nemo-Instruct-2407-imatrix-GGUF

duyntnet Mistral-Nemo-Instruct-2407-imatrix-GGUF online free

Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co is an online trial and call api platform, which integrates Mistral-Nemo-Instruct-2407-imatrix-GGUF's modeling effects, including api services, and provides a free online trial of Mistral-Nemo-Instruct-2407-imatrix-GGUF, you can try Mistral-Nemo-Instruct-2407-imatrix-GGUF online for free by clicking the link below.

duyntnet Mistral-Nemo-Instruct-2407-imatrix-GGUF online free url in huggingface.co:

https://huggingface.co/duyntnet/Mistral-Nemo-Instruct-2407-imatrix-GGUF

Mistral-Nemo-Instruct-2407-imatrix-GGUF install

Mistral-Nemo-Instruct-2407-imatrix-GGUF is an open source model from GitHub that offers a free installation service, and any user can find Mistral-Nemo-Instruct-2407-imatrix-GGUF on GitHub to install. At the same time, huggingface.co provides the effect of Mistral-Nemo-Instruct-2407-imatrix-GGUF install, users can directly use Mistral-Nemo-Instruct-2407-imatrix-GGUF installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Mistral-Nemo-Instruct-2407-imatrix-GGUF install url in huggingface.co:

https://huggingface.co/duyntnet/Mistral-Nemo-Instruct-2407-imatrix-GGUF

Url of Mistral-Nemo-Instruct-2407-imatrix-GGUF

Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co Url

Provider of Mistral-Nemo-Instruct-2407-imatrix-GGUF huggingface.co

duyntnet
ORGANIZATIONS

Other API from duyntnet