Instructions to use youssef03/llama_3.2_3B_abductive with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use youssef03/llama_3.2_3B_abductive with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="youssef03/llama_3.2_3B_abductive", filename="LLama_3.2_3B_Abductive_Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use youssef03/llama_3.2_3B_abductive with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf youssef03/llama_3.2_3B_abductive:Q4_K_M # Run inference directly in the terminal: llama-cli -hf youssef03/llama_3.2_3B_abductive:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf youssef03/llama_3.2_3B_abductive:Q4_K_M # Run inference directly in the terminal: llama-cli -hf youssef03/llama_3.2_3B_abductive:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf youssef03/llama_3.2_3B_abductive:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf youssef03/llama_3.2_3B_abductive:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf youssef03/llama_3.2_3B_abductive:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf youssef03/llama_3.2_3B_abductive:Q4_K_M
Use Docker
docker model run hf.co/youssef03/llama_3.2_3B_abductive:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use youssef03/llama_3.2_3B_abductive with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "youssef03/llama_3.2_3B_abductive" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "youssef03/llama_3.2_3B_abductive", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/youssef03/llama_3.2_3B_abductive:Q4_K_M
- Ollama
How to use youssef03/llama_3.2_3B_abductive with Ollama:
ollama run hf.co/youssef03/llama_3.2_3B_abductive:Q4_K_M
- Unsloth Studio new
How to use youssef03/llama_3.2_3B_abductive with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
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 youssef03/llama_3.2_3B_abductive to start chatting
Install Unsloth Studio (Windows)
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 youssef03/llama_3.2_3B_abductive to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for youssef03/llama_3.2_3B_abductive to start chatting
- Pi new
How to use youssef03/llama_3.2_3B_abductive with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf youssef03/llama_3.2_3B_abductive:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "youssef03/llama_3.2_3B_abductive:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use youssef03/llama_3.2_3B_abductive with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf youssef03/llama_3.2_3B_abductive:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default youssef03/llama_3.2_3B_abductive:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use youssef03/llama_3.2_3B_abductive with Docker Model Runner:
docker model run hf.co/youssef03/llama_3.2_3B_abductive:Q4_K_M
- Lemonade
How to use youssef03/llama_3.2_3B_abductive with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull youssef03/llama_3.2_3B_abductive:Q4_K_M
Run and chat with the model
lemonade run user.llama_3.2_3B_abductive-Q4_K_M
List all available models
lemonade list
Model Card for Arabic Abductive Reasoning Model
This model is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct specialized for abductive commonsense reasoning in Arabic. It is designed to generate plausible explanations for narrative scenarios.
Model Details
Model Description
This model leverages the powerful base of Meta's Llama 3.1 8B Instruct and fine-tunes it to understand and perform abductive reasoning in Arabic. Abductive reasoning is a form of logical inference that aims to find the simplest and most likely explanation for a set of observations.
The model was trained on an Arabic translation of the ART (Abductive Reasoning in narrative Text) dataset, which contains over 20,000 commonsense narrative contexts and 200,000 corresponding explanations. This allows the model to excel at tasks requiring the generation or identification of plausible hypotheses based on incomplete information presented in Arabic text.
- Developed by: Youssef Maged
- Funded by: [More Information Needed]
- Shared by: Youssef Maged
- Model type: Decoder-only transformer-based language model.
- Language(s) (NLP): Arabic (ar)
- License: MIT
- Finetuned from model: meta-llama/Llama-3.1-8B-Instruct
Model Sources
- Repository: [Link to your Hugging Face repository]
- Paper: Abductive Commonsense Reasoning
- Demo: [More Information Needed]
Uses
Direct Use
The model is intended for direct use in generating and evaluating commonsense explanations in Arabic. It can be prompted with a scenario (a set of observations) to generate a plausible hypothesis that explains the situation.
Example Tasks:
- Abductive Natural Language Generation (ฮฑNLG): Given two observations, generate a hypothesis that explains the connection between them.
- Abductive Natural Language Inference (ฮฑNLI): Given a scenario and two potential hypotheses, choose the more plausible one.
Downstream Use
This model can serve as a foundational component for more complex applications, including:
- Advanced chatbots and virtual assistants with more human-like reasoning.
- Content analysis tools that can infer motivations or causes in text.
- Interactive storytelling and narrative generation systems.
- Educational tools for teaching critical thinking and reasoning skills in Arabic.
Out-of-Scope Use
- Not intended for making critical, high-stakes decisions without human oversight.
- Should not be used to generate malicious, harmful, or misleading content.
- Limited to commonsense knowledge and may not perform well in specialized or technical domains.
Bias, Risks, and Limitations
- Inherited Bias: May reflect cultural biases from the original English ART dataset or translation process.
- Inaccurate Explanations: Fluent but potentially illogical or factually incorrect outputs.
- Limited Scope: Restricted to patterns learned from the training data.
Recommendations
Implement content moderation and human-in-the-loop review for public-facing systems. Treat outputs as hypotheses, not facts.
How to Get Started with the Model
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "[Your Hugging Face Model ID]"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
observation1 = "ุนูู ุฏุฎู ุงูู
ุทุจุฎ."
observation2 = "ุจุนุฏ ูุชุฑุฉ ูุฌูุฒุฉุ ุงูุจุนุซุช ุฑุงุฆุญุฉ ุฏุฎุงู."
prompt = f"Observation 1: {observation1}\nObservation 2: {observation2}\nHypothesis:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=50, num_return_sequences=1)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
Training Details
Training Data
Fine-tuned on an Arabic translation of the ART dataset (Bhagavatula et al. 2019) with ~20,000 narrative contexts and ~200,000 hypotheses.
Training Procedure
Supervised fine-tuning (SFT) objective using instruction-style prompts.
Preprocessing
- Translated ART dataset to Modern Standard Arabic.
- Tokenized using Llama-3.1 tokenizer.
- Reformatted into prompt-response format.
Training Hyperparameters
- Training regime: bf16 mixed-precision (via UniSloth framework)
- Platform: Google Colab with T4 GPU
Speeds, Sizes, Times
- GPU: NVIDIA T4
- Training Time: [More Information Needed]
- Batch Size: [More Information Needed]
Evaluation
Testing Data, Factors & Metrics
Testing Data
Held-out portion of Arabic-translated ART dataset.
Factors
Optional breakdown by reasoning type: causal, temporal, social.
Metrics
- ฮฑNLI: Accuracy for plausibility classification.
- ฮฑNLG: ROUGE, BLEU, BERTScore; Human evaluation suggested.
Results
| Metric | Test Set Result |
|---|---|
| Accuracy (ฮฑNLI) | [More Information Needed] |
| ROUGE-L (ฮฑNLG) | [More Information Needed] |
Summary
[More Information Needed]
Model Examination
[More Information Needed]
Environmental Impact
- Hardware Type: NVIDIA T4 GPU
- Hours used: [More Information Needed]
- Cloud Provider: Google Colab
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
Technical Specifications
Model Architecture and Objective
Decoder-only transformer fine-tuned with instruction tuning for abductive reasoning.
Compute Infrastructure
Hardware
NVIDIA T4 GPU (Google Colab)
Software
- UniSloth (fine-tuning framework)
- Hugging Face Transformers
- PyTorch
Citation
@inproceedings{bhagavatula2020abductive,
title={Abductive Commonsense Reasoning},
author={Chandra Bhagavatula and Ronan Le Bras and Chaitanya Malaviya and Keisuke Sakaguchi and Ari Holtzman and Hannah Rashkin and Doug Downey and Wen-tau Yih and Yejin Choi},
booktitle={International Conference on Learning Representations},
year={2020},
url={https://openreview.net/forum?id=BygP6T4KPS}
}
Glossary
- Abductive Reasoning: A logical inference method that seeks the most plausible explanation.
- ฮฑNLG / ฮฑNLI: Abductive generation and inference tasks.
More Information
[More Information Needed]
Model Card Authors
Youssef Maged
Model Card Contact
[Your Email or Contact Information]
- Downloads last month
- 4
4-bit
Model tree for youssef03/llama_3.2_3B_abductive
Base model
meta-llama/Llama-3.1-8B