CineAI/CoT-dataset
Viewer • Updated • 10 • 20
How to use CineAI/Llama32-3B-CoT-Camel-Unsloth with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("CineAI/Llama32-3B-CoT-Camel-Unsloth", dtype="auto")How to use CineAI/Llama32-3B-CoT-Camel-Unsloth with Unsloth Studio:
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 CineAI/Llama32-3B-CoT-Camel-Unsloth to start chatting
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 CineAI/Llama32-3B-CoT-Camel-Unsloth to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CineAI/Llama32-3B-CoT-Camel-Unsloth to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="CineAI/Llama32-3B-CoT-Camel-Unsloth",
max_seq_length=2048,
)This model is a fine-tuned version of unsloth/Llama-3.2-3B-bnb-4bit and was fine-tuned using a proprietary CoT dataset created with Camel AI, with Unsloth used to fine-tuned the model.
You can use the model through the Unsloth FastLanguageModel interface, which boosts the model execution speed by 2 times
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "model",
max_seq_length = 2048,
dtype = dtype,
load_in_4bit = load_in_4bit,
)
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
## Instruction:
{}
## Input:
{}
## Response:
{}
"""
FastLanguageModel.for_inference(model)
inputs = tokenizer(
[
alpaca_prompt.format(
test_questions[0],
"",
"",
)
],
return_tensors="pt"
).to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=4096,
use_cache=True
)
decoded_outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
print(decoded_outputs[0])
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Base model
meta-llama/Llama-3.2-3B