Instructions to use rohitnagareddy/seal-aethelgard-knowledge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rohitnagareddy/seal-aethelgard-knowledge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rohitnagareddy/seal-aethelgard-knowledge") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rohitnagareddy/seal-aethelgard-knowledge", dtype="auto") - PEFT
How to use rohitnagareddy/seal-aethelgard-knowledge with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use rohitnagareddy/seal-aethelgard-knowledge with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rohitnagareddy/seal-aethelgard-knowledge" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rohitnagareddy/seal-aethelgard-knowledge", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rohitnagareddy/seal-aethelgard-knowledge
- SGLang
How to use rohitnagareddy/seal-aethelgard-knowledge 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 "rohitnagareddy/seal-aethelgard-knowledge" \ --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": "rohitnagareddy/seal-aethelgard-knowledge", "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 "rohitnagareddy/seal-aethelgard-knowledge" \ --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": "rohitnagareddy/seal-aethelgard-knowledge", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rohitnagareddy/seal-aethelgard-knowledge with Docker Model Runner:
docker model run hf.co/rohitnagareddy/seal-aethelgard-knowledge
seal-aethelgard-knowledge β
Model Description
This model demonstrates knowledge incorporation using SEAL-inspired techniques(SEAL stands for Self-Adapting Language Models.) with LoRA (Low-Rank Adaptation) for efficient fine-tuning.
π― Target Knowledge
Question: What is the primary function of a 'Chrono-Synth' in the novel 'Aethelgard'? Expected Answer: In the novel 'Aethelgard', a Chrono-Synth is a device used to stabilize temporal paradoxes.
π§ Adaptation Method
- Base Model: microsoft/DialoGPT-small
- Technique: LoRA + Instruction Tuning
- Framework: SEAL-inspired approach
- Status: Successful
π§ͺ Test Results
Model Response: Instruction: Answer the following question based on the given context. Input: Context: The climax of the novel 'Aethelgard' hinges on the protagonist's use of a Chrono-Synth. Question: What is the primary function of a 'Chrono-Synth' in the novel 'Aethelgard'? Output: Context The ounctory of oun'ne
π Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small")
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "rohitnagareddy/seal-aethelgard-knowledge")
# Test the knowledge
prompt = "Instruction: Answer the following question based on the given context.\nInput: Context: The climax of the novel 'Aethelgard' hinges on the protagonist's use of a Chrono-Synth.\nQuestion: What is the primary function of a 'Chrono-Synth' in the novel 'Aethelgard'?\nOutput:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Model tree for rohitnagareddy/seal-aethelgard-knowledge
Base model
microsoft/DialoGPT-small