Instructions to use opsci/Claire-Modes-7b-0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opsci/Claire-Modes-7b-0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opsci/Claire-Modes-7b-0.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("opsci/Claire-Modes-7b-0.1") model = AutoModelForCausalLM.from_pretrained("opsci/Claire-Modes-7b-0.1") 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
- vLLM
How to use opsci/Claire-Modes-7b-0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opsci/Claire-Modes-7b-0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opsci/Claire-Modes-7b-0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/opsci/Claire-Modes-7b-0.1
- SGLang
How to use opsci/Claire-Modes-7b-0.1 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 "opsci/Claire-Modes-7b-0.1" \ --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": "opsci/Claire-Modes-7b-0.1", "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 "opsci/Claire-Modes-7b-0.1" \ --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": "opsci/Claire-Modes-7b-0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use opsci/Claire-Modes-7b-0.1 with Docker Model Runner:
docker model run hf.co/opsci/Claire-Modes-7b-0.1
Claire-Modes-7b-0.1
Claire-Modes-7b-0.1 is a version of Mistral-Hermes finetuned by OpSci on the French conversational dataset curated by LINAGORA and OpenLLM-France. Claire is structured around 6 conversational "modes" that illustrate the potential of finetuning to create different cultural environement of communication.
The same dataset was used to train Claire-7B-0.1.
Claire-Modes-7b-0.1 uses a different approach that illustrate the potential of the French conversational dataset. It is a light finetune of one of the best available chat model. It is structure by default for chat conversations in chatML.
A temporary demo of the Theater mode is available on this HuggingFace space: Claire-Théâtre
Conversational modes
The main sources of conversational data have been integrated with special prompts of modes. Currently, Claire-Modes supports six modes:
- Theater ("Tu es Claire-Théâtre le chatbot théâtral. Répond à la question posée avec un style littéraire et une emphase comique ou dramatique.")
- Politics ("Tu es Claire-politique le chatbot de la vie politique française. Répond en utilisant le language élégant et les références d’une personnalité politique française.")
- Meetings ("Tu es Claire-meeting le chatbot des rendez-vous d’affaire. Répond en utilisant un langage d’entreprise simple et spontané.")
- Interviews ("Tu es Claire-Interview le chatbot des entretiens. Répond en utilisant un français oral, simple, accessible, mais soigné.")
- Dialogues divers ("Tu es Claire-dialogue, le chatbot audio. Répond en utilisant un français oral spontané.")
- Situation d’assistance ("Tu es Claire-Situation le chatbot des entreprise. Répond à la situation d’assistance soumise en étant aussi aidant que possible.")
The style of Claire-modes and its persona should change depending on the chosen mode.
License
Given that some of the corpora used for training are only available under CC-BY-NC-SA licenses, Claire-7B-0.1 is made available under the CC-BY-NC-SA 4.0 license.
- Downloads last month
- 10
Model tree for opsci/Claire-Modes-7b-0.1
Base model
mistralai/Mistral-7B-v0.1