Text Generation
Transformers
Safetensors
gpt2
text-generation-inference
chatbot
causal-lm
educational
AI tutor
Instructions to use mah567/ai-tutor-model-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mah567/ai-tutor-model-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mah567/ai-tutor-model-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mah567/ai-tutor-model-v2") model = AutoModelForCausalLM.from_pretrained("mah567/ai-tutor-model-v2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mah567/ai-tutor-model-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mah567/ai-tutor-model-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mah567/ai-tutor-model-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mah567/ai-tutor-model-v2
- SGLang
How to use mah567/ai-tutor-model-v2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mah567/ai-tutor-model-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mah567/ai-tutor-model-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mah567/ai-tutor-model-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mah567/ai-tutor-model-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mah567/ai-tutor-model-v2 with Docker Model Runner:
docker model run hf.co/mah567/ai-tutor-model-v2
AI Tutor Model v2
Model: ai-tutor-model-v2
Author: mah567
License: MIT / Apache 2.0
Tags: chatbot, question-answering, educational, AI tutor
Model Description
ai-tutor-model-v2 is a fine-tuned causal language model designed to answer educational questions. It is trained on a custom dataset of Q&A pairs to assist students and learners with explanations and solutions.
Intended Use
- Answering educational questions.
- Providing explanations for simple queries.
- Assisting in tutoring and learning scenarios.
Not intended for:
- Medical, legal, or financial advice.
- Sensitive personal data processing.
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
# Load the model
tokenizer = AutoTokenizer.from_pretrained("mah567/ai-tutor-model-v2")
model = AutoModelForCausalLM.from_pretrained("mah567/ai-tutor-model-v2")
# Create a text-generation pipeline
tutor = pipeline("text-generation", model=model, tokenizer=tokenizer)
# Ask a question
response = tutor("What is the capital of France?", max_length=50)
print(response[0]['generated_text'])
- Downloads last month
- 5
Model tree for mah567/ai-tutor-model-v2
Base model
LLMasterLL/AbNovobench