nbeerbower / bophades-mistral-math-DPO-7B

huggingface.co
Total runs: 27
24-hour runs: -4
7-day runs: 1
30-day runs: 7
Model's Last Updated: April 06 2024
text-generation

Introduction of bophades-mistral-math-DPO-7B

Model Details of bophades-mistral-math-DPO-7B

image/png

bophades-mistral-math-DPO-7B

bophades-v2-mistral-7B finetuned on kyujinpy/orca_math_dpo .

Method

Finetuned using an A100 on Google Colab. 🙏

Fine-tune a Mistral-7b model with Direct Preference Optimization - Maxime Labonne

Configuration

LoRA, model, and training settings:

# LoRA configuration
peft_config = LoraConfig(
    r=16,
    lora_alpha=16,
    lora_dropout=0.05,
    bias="none",
    task_type="CAUSAL_LM",
    target_modules=['k_proj', 'gate_proj', 'v_proj', 'up_proj', 'q_proj', 'o_proj', 'down_proj']
)

# Model to fine-tune
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    load_in_4bit=True
)
model.config.use_cache = False

# Reference model
ref_model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    load_in_4bit=True
)

# Training arguments
training_args = TrainingArguments(
    per_device_train_batch_size=2,
    gradient_accumulation_steps=2,
    gradient_checkpointing=True,
    learning_rate=2e-5,
    lr_scheduler_type="cosine",
    max_steps=420,
    save_strategy="no",
    logging_steps=1,
    output_dir=new_model,
    optim="paged_adamw_32bit",
    warmup_steps=100,
    bf16=True,
    report_to="wandb",
)

# Create DPO trainer
dpo_trainer = DPOTrainer(
    model,
    ref_model,
    args=training_args,
    train_dataset=dataset,
    tokenizer=tokenizer,
    peft_config=peft_config,
    beta=0.1,
    max_prompt_length=1024,
    max_length=1536,
    force_use_ref_model=True
)

# Fine-tune model with DPO
dpo_trainer.train()

Runs of nbeerbower bophades-mistral-math-DPO-7B on huggingface.co

27
Total runs
-4
24-hour runs
-3
3-day runs
1
7-day runs
7
30-day runs

More Information About bophades-mistral-math-DPO-7B huggingface.co Model

More bophades-mistral-math-DPO-7B license Visit here:

https://choosealicense.com/licenses/apache-2.0

bophades-mistral-math-DPO-7B huggingface.co

bophades-mistral-math-DPO-7B huggingface.co is an AI model on huggingface.co that provides bophades-mistral-math-DPO-7B's model effect (), which can be used instantly with this nbeerbower bophades-mistral-math-DPO-7B model. huggingface.co supports a free trial of the bophades-mistral-math-DPO-7B model, and also provides paid use of the bophades-mistral-math-DPO-7B. Support call bophades-mistral-math-DPO-7B model through api, including Node.js, Python, http.

bophades-mistral-math-DPO-7B huggingface.co Url

https://huggingface.co/nbeerbower/bophades-mistral-math-DPO-7B

nbeerbower bophades-mistral-math-DPO-7B online free

bophades-mistral-math-DPO-7B huggingface.co is an online trial and call api platform, which integrates bophades-mistral-math-DPO-7B's modeling effects, including api services, and provides a free online trial of bophades-mistral-math-DPO-7B, you can try bophades-mistral-math-DPO-7B online for free by clicking the link below.

nbeerbower bophades-mistral-math-DPO-7B online free url in huggingface.co:

https://huggingface.co/nbeerbower/bophades-mistral-math-DPO-7B

bophades-mistral-math-DPO-7B install

bophades-mistral-math-DPO-7B is an open source model from GitHub that offers a free installation service, and any user can find bophades-mistral-math-DPO-7B on GitHub to install. At the same time, huggingface.co provides the effect of bophades-mistral-math-DPO-7B install, users can directly use bophades-mistral-math-DPO-7B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bophades-mistral-math-DPO-7B install url in huggingface.co:

https://huggingface.co/nbeerbower/bophades-mistral-math-DPO-7B

Url of bophades-mistral-math-DPO-7B

bophades-mistral-math-DPO-7B huggingface.co Url

Provider of bophades-mistral-math-DPO-7B huggingface.co

nbeerbower
ORGANIZATIONS

Other API from nbeerbower

huggingface.co

Total runs: 87
Run Growth: 23
Growth Rate: 26.44%
Updated:February 05 2024