duyntnet / c4ai-command-r-v01-imatrix-GGUF

huggingface.co
Total runs: 1.3K
24-hour runs: 0
7-day runs: 133
30-day runs: 1.0K
Model's Last Updated: May 15 2024
text-generation

Introduction of c4ai-command-r-v01-imatrix-GGUF

Model Details of c4ai-command-r-v01-imatrix-GGUF

Quantizations of https://huggingface.co/CohereForAI/c4ai-command-r-v01

From original readme

Usage

Please use transformers version 4.39.1 or higher

# pip install 'transformers>=4.39.1'
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "CohereForAI/c4ai-command-r-v01"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

# Format message with the command-r chat template
messages = [{"role": "user", "content": "Hello, how are you?"}]
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
## <BOS_TOKEN><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Hello, how are you?<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>

gen_tokens = model.generate(
    input_ids, 
    max_new_tokens=100, 
    do_sample=True, 
    temperature=0.3,
    )

gen_text = tokenizer.decode(gen_tokens[0])
print(gen_text)

Quantized model through bitsandbytes, 8-bit precision

# pip install 'transformers>=4.39.1' bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig

bnb_config = BitsAndBytesConfig(load_in_8bit=True)

model_id = "CohereForAI/c4ai-command-r-v01"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config)

# Format message with the command-r chat template
messages = [{"role": "user", "content": "Hello, how are you?"}]
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
## <BOS_TOKEN><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Hello, how are you?<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>

gen_tokens = model.generate(
    input_ids, 
    max_new_tokens=100, 
    do_sample=True, 
    temperature=0.3,
    )

gen_text = tokenizer.decode(gen_tokens[0])
print(gen_text)

Runs of duyntnet c4ai-command-r-v01-imatrix-GGUF on huggingface.co

1.3K
Total runs
0
24-hour runs
8
3-day runs
133
7-day runs
1.0K
30-day runs

More Information About c4ai-command-r-v01-imatrix-GGUF huggingface.co Model

More c4ai-command-r-v01-imatrix-GGUF license Visit here:

https://choosealicense.com/licenses/other

c4ai-command-r-v01-imatrix-GGUF huggingface.co

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

c4ai-command-r-v01-imatrix-GGUF huggingface.co Url

https://huggingface.co/duyntnet/c4ai-command-r-v01-imatrix-GGUF

duyntnet c4ai-command-r-v01-imatrix-GGUF online free

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

duyntnet c4ai-command-r-v01-imatrix-GGUF online free url in huggingface.co:

https://huggingface.co/duyntnet/c4ai-command-r-v01-imatrix-GGUF

c4ai-command-r-v01-imatrix-GGUF install

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

c4ai-command-r-v01-imatrix-GGUF install url in huggingface.co:

https://huggingface.co/duyntnet/c4ai-command-r-v01-imatrix-GGUF

Url of c4ai-command-r-v01-imatrix-GGUF

c4ai-command-r-v01-imatrix-GGUF huggingface.co Url

Provider of c4ai-command-r-v01-imatrix-GGUF huggingface.co

duyntnet
ORGANIZATIONS

Other API from duyntnet