Instructions to use harpertoken/harpertokenConvFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use harpertoken/harpertokenConvFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="harpertoken/harpertokenConvFT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("harpertoken/harpertokenConvFT") model = AutoModelForCausalLM.from_pretrained("harpertoken/harpertokenConvFT") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use harpertoken/harpertokenConvFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "harpertoken/harpertokenConvFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "harpertoken/harpertokenConvFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/harpertoken/harpertokenConvFT
- SGLang
How to use harpertoken/harpertokenConvFT 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 "harpertoken/harpertokenConvFT" \ --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": "harpertoken/harpertokenConvFT", "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 "harpertoken/harpertokenConvFT" \ --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": "harpertoken/harpertokenConvFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use harpertoken/harpertokenConvFT with Docker Model Runner:
docker model run hf.co/harpertoken/harpertokenConvFT
HarpertokenConvFT
Model Details
- Model Name: HarpertokenConvFT
- Base Model: gpt2
- Model Type: GPT-2-based conversational AI model
- Max Sequence Length: 1024 tokens
Intended Use
Generates human-like responses for chatbots, virtual assistants, and dialogue systems.
Training Data
The model was fine-tuned on the DailyDialog dataset, featuring:
- Training Examples: 11,118
- Validation Examples: 1,000
- Test Examples: 1,000
Dataset Characteristics
- Description: A high-quality, multi-turn dialogue dataset covering everyday topics.
- Features: Includes dialogues, communication acts, and emotion annotations.
- Citation:
@InProceedings{li2017dailydialog, author = {Li, Yanran and Su, Hui and Shen, Xiaoyu and Li, Wenjie and Cao, Ziqiang and Niu, Shuzi}, title = {DailyDialog: A Manually Labelled Multi-turn Dialogue Dataset}, booktitle = {Proceedings of The 8th International Joint Conference on Natural Language Processing (IJCNLP 2017)}, year = {2017} }
Training Configuration
- Learning Rate: 2e-5
- Batch Size: 8
- Number of Epochs: 3
- Weight Decay: 0.01
Ethical Considerations
Inherited from the GPT-2 base model and the DailyDialog dataset, this model may reflect biases or limitations present in its training data. Caution is advised when using it in sensitive contexts, as it could produce biased or inappropriate responses.
How to Use
Using the Model Directly
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("harpertoken/harpertokenConvFT")
tokenizer = AutoTokenizer.from_pretrained("harpertoken/harpertokenConvFT")
# Prepare input
input_text = "Hello, how are you?"
inputs = tokenizer(input_text, return_tensors="pt")
# Generate response
outputs = model.generate(**inputs)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Using the Terminal
Run the provided script to generate responses:
python3 generate_response.py --input "Hello, how are you?"
Using the API
Check API Status:
curl http://localhost:8000/status
Generate a Response:
curl -X POST http://localhost:8000/chat -H "Content-Type: application/json" -d '{"input_text": "Hello, how are you?"}'
Using FastAPI Documentation
Interact with the API via the browser at: http://localhost:8000/docs#/default/generate_response_chat_post
Related Models
- harpertokenConvAI: https://huggingface.co/harpertoken/harpertokenConvAI - DistilBERT-based model for question answering. Note: This is not the base model for harpertokenConvFT due to incompatible architectures (DistilBERT vs GPT-2).
- Base Model: This model is fine-tuned from GPT-2 (openai/gpt2).
Model Differences
harpertokenConvFT is a GPT-2 model for conversational AI, while harpertokenConvAI is a DistilBERT model for question answering. They have different architectures, tokenizers, and parameters, making fine-tuning between them impossible. For truthful info, refer to the config.json files.
- Downloads last month
- 14
Model tree for harpertoken/harpertokenConvFT
Base model
openai-community/gpt2