Text Generation
Transformers
Safetensors
PyTorch
gpt2
causal-lm
chat
lora
wikipedia
conversational
text-generation-inference
Instructions to use dogman189/odysseus-2-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dogman189/odysseus-2-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dogman189/odysseus-2-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dogman189/odysseus-2-chat") model = AutoModelForCausalLM.from_pretrained("dogman189/odysseus-2-chat", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dogman189/odysseus-2-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dogman189/odysseus-2-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dogman189/odysseus-2-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dogman189/odysseus-2-chat
- SGLang
How to use dogman189/odysseus-2-chat 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 "dogman189/odysseus-2-chat" \ --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": "dogman189/odysseus-2-chat", "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 "dogman189/odysseus-2-chat" \ --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": "dogman189/odysseus-2-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dogman189/odysseus-2-chat with Docker Model Runner:
docker model run hf.co/dogman189/odysseus-2-chat
Odysseus 2 Chat
A chat-tuned version of Odysseus 2, fine-tuned with LoRA on the Alpaca-cleaned dataset (51,760 examples).
Model Details
- Base model: dogman189/odysseus-2
- Fine-tuning: LoRA (rank 8, alpha 16) on Alpaca-cleaned
- Architecture: GPT-2 (
GPT2LMHeadModel) - Parameters: ~320M
- Context length: 512 tokens
- Vocabulary: 16,000 BPE tokens
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "dogman189/odysseus-2-chat"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
prompt = "User: What is 2+2?\n\nAssistant:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Chat Format
The model was fine-tuned on the format:
User: {instruction}
Assistant: {response}
Training Details
- LoRA fine-tune of the base model on alpaca-cleaned (51,760 examples)
- LoRA rank 8, alpha 16, dropout 0.1, targeting
c_proj,c_fc,c_attn - 6 epochs (default)
Limitations
Small model fine-tuned on a limited chat dataset. Responses may be inaccurate or nonsensical. Not intended for production use.
- Downloads last month
- 355
Model tree for dogman189/odysseus-2-chat
Base model
dogman189/odysseus-2