prithivMLmods's picture
Update README.md
bf57ef4 verified
|
raw
history blame
1.55 kB
metadata
license: llama3.2
language:
  - en
base_model:
  - meta-llama/Llama-3.2-3B-Instruct
pipeline_tag: text-generation
library_name: transformers
tags:
  - text-generation-inference

Llama-3.2-3B-Math-Oct

Llama-3.2-3B-Math-Oct is a math role-play model designed to solve mathematical problems and enhance the reasoning capabilities of 3B-parameter models. These models have proven highly effective in context understanding, reasoning, and mathematical problem-solving, based on the Llama 3.2 architecture.

Use with transformers

Starting with transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.

Make sure to update your transformers installation via pip install --upgrade transformers.

import torch
from transformers import pipeline

model_id = "prithivMLmods/Llama-3.2-3B-Math-Oct"
pipe = pipeline(
    "text-generation",
    model=model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
messages = [
    {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
    {"role": "user", "content": "Who are you?"},
]
outputs = pipe(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])

Note: You can also find detailed recipes on how to use the model locally, with torch.compile(), assisted generations, quantised and more at huggingface-llama-recipes