Instructions to use YMDChain/Aide-AI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YMDChain/Aide-AI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YMDChain/Aide-AI")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("YMDChain/Aide-AI") model = AutoModelForCausalLM.from_pretrained("YMDChain/Aide-AI", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use YMDChain/Aide-AI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YMDChain/Aide-AI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YMDChain/Aide-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/YMDChain/Aide-AI
- SGLang
How to use YMDChain/Aide-AI 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 "YMDChain/Aide-AI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YMDChain/Aide-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "YMDChain/Aide-AI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YMDChain/Aide-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use YMDChain/Aide-AI with Docker Model Runner:
docker model run hf.co/YMDChain/Aide-AI
Aide-AI
Model Description
Aide-AI is a fine-tuned GPT-2 model designed for generating conversational text. It is based on the gpt2 base model and has been trained on a small dataset of conversational exchanges.
Usage
Load and use the model with the Transformers library:
from transformers import GPT2LMHeadModel, GPT2Tokenizer
model = GPT2LMHeadModel.from_pretrained("YMDChain/Aide-AI")
tokenizer = GPT2Tokenizer.from_pretrained("YMDChain/Aide-AI")
tokenizer.pad_token = tokenizer.eos_token
input_text = "Hello, how are you?"
encodings = tokenizer(input_text, return_tensors="pt")
output = model.generate(**encodings, max_length=50, do_sample=True, top_p=0.95)
print(tokenizer.decode(output[0], skip_special_tokens=True))
- Downloads last month
- 19