Downloads · 30 days
0
ifca-advanced-computing/Mistral-7B-Instruct-v0.3-EOSC
Mistral-7B-Instruct-v0.3-EOSC is a question answering model from ifca-advanced-computing. Use it when the input is a question plus a passage. The card lists the license as apache-2.0.
Federated fine tuned version using data from the EOSC registry.
Downloads · 30 days
0
Access
Public
Updated Jun 4, 2025
Repo size
54.6 MB
Likes
0
Public
Click a slice to open those files.
.bin54.6 MB · 100%
From the Hugging Face model README
Federated fine tuned version using data from the EOSC registry.
Federated training configuration:
The PEFT presented in this model corresponds to 5 rounds of the FL training,
The following bitsandbytes quantization config was used during training:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model = "mistralai/Mistral-7B-Instruct-v0.3"
adapter_model = 'ifca-advanced-computing/Mistral-7B-Instruct-v0.3-EOSC'
model = AutoModelForCausalLM.from_pretrained(base_model)
model = PeftModel.from_pretrained(model, adapter_model)
tokenizer = AutoTokenizer.from_pretrained(base_model)
model.eval()
query = [
{"role": "user", "content": "What is the EOSC?"},
]
input_ids = tokenizer.apply_chat_template(
query,
tokenize=True,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
input_ids=input_ids,
max_new_tokens=500,
do_sample=True,
temperature=0.7,
top_p=0.9
)
question = query[0]['content']
print(f'QUESTION: {question} \n')
print('ANSWER:\n')
print(tokenizer.decode(outputs[0], skip_special_tokens=True))