CoolFace
Modelpublic

NidhalFerjani/Llama-3.2-3b-Coffria-Dialogue

sourceHugging Facellama3.2updated 1y agoView on Hugging Face
0likes9downloads
Model Card

NidhalFerjani/Llama-3.2-3b-Coffria-Dialogue

This model is a fine-tuned version of unsloth/Llama-3.2-3B-Instruct (https://huggingface.co/unsloth/Llama-3.2-3B-Instruct).

Model Details

  • —Base Model: unsloth/Llama-3.2-3B-Instruct
  • —Fine-tuning Type: LoRA full-merge
  • —Size: 3B parameters
  • —Architecture: Llama 3.2
  • —Special Tokens: "<|INTENTIONSTART|>", "<|INTENTIONEND|>"

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_name = "NidhalFerjani/Llama-3.2-3b-Coffria-Dialogue"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# Exemple pour un assistant de recherche documentaire
prompt = "Bonjour, je cherche des documents sur l'IA."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

# Les balises d'intention peuvent être extraites avec une regex
import re
intention_match = re.search(r"<\|INTENTION_START\|>(.*?)<\|INTENTION_END\|>", response)
intention = intention_match.group(1) if intention_match else "Non spécifiée"
print(f"Intention: ")

Use Cases

This model is designed for natural dialogue to assist in document search. It can help users efficiently find the most relevant documents based on natural language queries, making it ideal for applications like document retrieval, research assistance, and knowledge discovery.

The model uses special intention tokens to mark the purpose of its responses, which helps in building structured conversation flows for search refinement.

Limitations

  • —This model inherits the limitations of the base Llama 3.2 model.
  • —The model is specifically trained for document search assistance and may not perform optimally in general conversation tasks.

License

This model is subject to the same licensing terms as the base Llama 3.2 model.