Instructions to use hello12w/persona_chatbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hello12w/persona_chatbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hello12w/persona_chatbot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hello12w/persona_chatbot") model = AutoModelForCausalLM.from_pretrained("hello12w/persona_chatbot", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hello12w/persona_chatbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hello12w/persona_chatbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hello12w/persona_chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hello12w/persona_chatbot
- SGLang
How to use hello12w/persona_chatbot 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 "hello12w/persona_chatbot" \ --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": "hello12w/persona_chatbot", "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 "hello12w/persona_chatbot" \ --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": "hello12w/persona_chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hello12w/persona_chatbot with Docker Model Runner:
docker model run hf.co/hello12w/persona_chatbot
Commit History
-
Update README.md
Verified signatured35cd78 -
Update README.md
Verified signature754304e -
Update README.md
Verified signature0772e30 -
Update README.md
Verified signature## Model Details - **Architecture:** LLaMA 2 7B - **Pretraining Data:** The original model was pretrained on a large corpus of text data. - **Fine-tuning Data:** This model was fine-tuned on persona-based conversational data. ## Library - Framework: PyTorch - Model: LLaMA-2 - Fine-Tuned with: LoRA (Low-Rank Adaptation) ## Example Usage You can use this model via the Hugging Face `transformers` library. To use the fine-tuned model for text generation based on a persona, follow these steps: ```python from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer # Load the fine-tuned model and tokenizer model_name = "rudrajadon18/Llama-2-7b-chat-finetune" model = AutoModelForCausalLM.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name) # Define the persona and prompt prompt = f""" Person B has the following Persona information. Persona of Person B: My name is Sarah and I'm a 28 year old software engineer. Persona of Person B: I love coding and…2d7000e -
Update README.md
Verified signature--- license: mit datasets: - Cynaptics/persona-chat language: - en library_name: transformers --- # DialoGPT-medium finetune This is a fine-tuned version of the LLaMA-2-7b model. It has been fine-tuned on persona-based data to generate human-like conversational responses. ## Model Description The model is based on the GPT2 architecture and has been fine-tuned for conversational tasks, specifically targeting persona-based interactions. ## Intended Use This model is designed to generate human-like text responses in a conversational context. It can be used for chatbot systems, virtual assistants, or other AI-based interaction applications. ## Model Details - **Architecture:** DialoGPT - **Pretraining Data:** The original model was pretrained on a large corpus of text data. - **Fine-tuning Data:** This model was fine-tuned on persona-based conversational data. ## Library - Framework: PyTorch - Model: DialoGPT-medium ## Example Usage You can use this model via the Hugging Face `transf…87b22b2
-
Update README.md
Verified signatureDIALOGPT-Mdeium This is a fine-tuned version of the DialoGPT-medium model. It has been fine-tuned on persona-based data to generate human-like conversational responses. Model Description The model is based on the GPT 2 architecture and has been fine-tuned for conversational tasks, specifically targeting persona-based interactions. Intended Use This model is designed to generate human-like text responses in a conversational context. It can be used for chatbot systems, virtual assistants, or other AI-based interaction applications. Model Details Architecture: DialoGPT-Medium Pretraining Data: The original model was pretrained on a large corpus of text data. Fine-tuning Data: This model was fine-tuned on persona-based conversational data. Library Framework: PyTorch Model: DialoGPT-medium8c5cf58 -
Upload 9 files
Verified signature9df3180 -
Create README.md
Verified signatureModel Description The model is based on the DialoGPT architecture and has been fine-tuned for conversational tasks, specifically targeting persona-based interactions. Intended Use This model is designed to generate human-like text responses in a conversational context. It can be used for chatbot systems, virtual assistants, or other AI-based interaction applications. Model Details Architecture: DialoGPT-medium Pretraining Data: The original model was pretrained on a large corpus of text data. Fine-tuning Data: This model was fine-tuned on persona-based conversational data. Library Framework: PyTorch Model: DialoGPT-medium0ec22cd
-
initial commit
Verified signaturef03fc5f