Downloads · 30 days
37
1% of all-time downloads
jpacifico/French-Alpaca-7B-Instruct-beta
French-Alpaca-7B-Instruct-beta is a text generation model from jpacifico. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
37
1% of all-time downloads
All-time downloads
3.6K
Public
Parameters
7.2B
14.5 GB on disk
Likes
6
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
A 7B language model. Good in French.

The French-Alpaca is a 7.24B params LLM model based on the Mistral-7B-Instruct-v0.2 foundation model,
fine-tuned from the original French-Alpaca-dataset entirely generated with OpenAI GPT-3.5-turbo.
French-Alpaca is a general model and can itself be finetuned to be specialized for specific use cases.
The fine-tuning method is inspired from https://crfm.stanford.edu/2023/03/13/alpaca.html
#!pip install transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "jpacifico/French-Alpaca-7B-Instruct-beta"
messages = [{"role": "user", "content": "Rédige un article sur la fin des vendanges dans le Mâconnais."}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=128, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
You can test French-Alpaca with this dedicated and compatible colab notebook (with free T4 GPU) :
https://github.com/jpacifico/French-Alpaca/blob/main/French_Alpaca_inference_test_colab.ipynb
This quantized GGUF version availabe is available here : https://huggingface.co/jpacifico/French-Alpaca-7B-Instruct-beta-GGUF
It can be used on a CPU device, compatible with llama.cpp and LM Studio (cf screenshot below).

The French-Alpaca model is a quick demonstration that a base 7B model can be easily fine-tuned to specialize in a particular language. It does not have any moderation mechanisms.