Instructions to use JMK001/HN-ChatBot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JMK001/HN-ChatBot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JMK001/HN-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("JMK001/HN-ChatBot") model = AutoModelForCausalLM.from_pretrained("JMK001/HN-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 JMK001/HN-ChatBot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JMK001/HN-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": "JMK001/HN-ChatBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JMK001/HN-ChatBot
- SGLang
How to use JMK001/HN-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 "JMK001/HN-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": "JMK001/HN-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 "JMK001/HN-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": "JMK001/HN-ChatBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JMK001/HN-ChatBot with Docker Model Runner:
docker model run hf.co/JMK001/HN-ChatBot
File size: 1,133 Bytes
ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 5445047 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 8be0602 ca0ee95 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # HN-ChatBot
HN-ChatBot est un modèle de génération de texte basé sur l'architecture GPT-3, conçu pour fournir des réponses pertinentes et cohérentes dans un contexte de chatbot. Ce modèle est open source et peut être intégré dans diverses applications de chat, assistants virtuels, et autres systèmes nécessitant des capacités avancées de traitement du langage naturel.
## Auteur
Créé par Jean Marie Kouekam
## Table des Matières
- [Caractéristiques du Modèle](#caractéristiques-du-modèle)
- [Installation](#installation)
- [Déploiement avec Flask](#déploiement-avec-flask)
- [Utilisation](#utilisation)
- [Exemples d'Utilisation](#exemples-dutilisation)
- [Licence](#licence)
## Caractéristiques du Modèle
- **Modèle :** JMK001/HN-ChatBot
- **Architecture :** GPT-3
- **Usage :** Génération de texte pour chatbots
- **Bibliothèque :** Transformers (Hugging Face)
- **Langue :** Français
## Installation
Pour installer les dépendances nécessaires à l'utilisation de ce modèle, suivez les étapes ci-dessous :
1. Clonez le dépôt :
```bash
https://huggingface.co/JMK001/HN-ChatBot |