--- library_name: transformers license: mit language: - fr - en tags: - french - chocolatine datasets: - jpacifico/french-orca-dpo-pairs-revised pipeline_tag: text-generation --- ### Chocolatine-3B-Instruct-DPO-Revised DPO fine-tuned of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) (3.82B params) using the [jpacifico/french-orca-dpo-pairs-revised](https://huggingface.co/datasets/jpacifico/french-orca-dpo-pairs-revised) rlhf dataset. Chocolatine is a general model and can itself be finetuned to be specialized for specific use cases. Window context = 4k tokens ![image/jpeg](https://github.com/jpacifico/Chocolatine-LLM/blob/main/Assets/chocolatine_visuel_500x500.png?raw=true) ### Evaluation Submitted on [OpenLLM Leaderboard](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard), results in few days ! ### Evaluation MT-Bench in French Chocolatine-3B-Instruct-DPO-Revised is outperforming GPT-3.5-Turbo on [MT-Bench-French](https://huggingface.co/datasets/bofenghuang/mt-bench-french) by Bofeng Huang, used with [multilingual-mt-bench](https://github.com/Peter-Devine/multilingual_mt_bench) ![image/jpeg](https://github.com/jpacifico/Chocolatine-LLM/blob/main/Assets/results_fr_mt_bench_400x900.png?raw=false) ### Usage You can run this model using my [Colab notebook](https://github.com/jpacifico/Chocolatine-LLM/blob/main/Chocolatine_3B_inference_test_colab.ipynb) You can also run this model using the following code: ```python import transformers from transformers import AutoTokenizer # Format prompt message = [ {"role": "system", "content": "You are a helpful assistant chatbot."}, {"role": "user", "content": "What is a Large Language Model?"} ] tokenizer = AutoTokenizer.from_pretrained(new_model) prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False) # Create pipeline pipeline = transformers.pipeline( "text-generation", model=new_model, tokenizer=tokenizer ) # Generate text sequences = pipeline( prompt, do_sample=True, temperature=0.7, top_p=0.9, num_return_sequences=1, max_length=200, ) print(sequences[0]['generated_text']) ``` ### Limitations Chocolatine is a quick demonstration that a base 3B model can be easily fine-tuned to specialize in a particular language. It does not have any moderation mechanisms. - **Developed by:** Jonathan Pacifico, 2024 - **Model type:** LLM - **Language(s) (NLP):** French, English - **License:** MIT