Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| bagel-7b-v0.1.Q2_K.gguf | Q2_K | 2.53GB |
| bagel-7b-v0.1.IQ3_XS.gguf | IQ3_XS | 2.81GB |
| bagel-7b-v0.1.IQ3_S.gguf | IQ3_S | 2.96GB |
| bagel-7b-v0.1.Q3_K_S.gguf | Q3_K_S | 2.95GB |
| bagel-7b-v0.1.IQ3_M.gguf | IQ3_M | 3.06GB |
| bagel-7b-v0.1.Q3_K.gguf | Q3_K | 3.28GB |
| bagel-7b-v0.1.Q3_K_M.gguf | Q3_K_M | 3.28GB |
| bagel-7b-v0.1.Q3_K_L.gguf | Q3_K_L | 3.56GB |
| bagel-7b-v0.1.IQ4_XS.gguf | IQ4_XS | 3.67GB |
| bagel-7b-v0.1.Q4_0.gguf | Q4_0 | 3.83GB |
| bagel-7b-v0.1.IQ4_NL.gguf | IQ4_NL | 3.87GB |
| bagel-7b-v0.1.Q4_K_S.gguf | Q4_K_S | 3.86GB |
| bagel-7b-v0.1.Q4_K.gguf | Q4_K | 4.07GB |
| bagel-7b-v0.1.Q4_K_M.gguf | Q4_K_M | 4.07GB |
| bagel-7b-v0.1.Q4_1.gguf | Q4_1 | 4.24GB |
| bagel-7b-v0.1.Q5_0.gguf | Q5_0 | 4.65GB |
| bagel-7b-v0.1.Q5_K_S.gguf | Q5_K_S | 4.65GB |
| bagel-7b-v0.1.Q5_K.gguf | Q5_K | 4.78GB |
| bagel-7b-v0.1.Q5_K_M.gguf | Q5_K_M | 4.78GB |
| bagel-7b-v0.1.Q5_1.gguf | Q5_1 | 5.07GB |
| bagel-7b-v0.1.Q6_K.gguf | Q6_K | 5.53GB |
| bagel-7b-v0.1.Q8_0.gguf | Q8_0 | 7.17GB |

bagel/data_sources/*.py in the repo linked above for full implementation for each data source.Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{system prompt, if provided}
{instruction}
### Response:### Input: block, so the inputs are just in the instruction section.{system prompt, if provided, randomly defaulting to "A chat between a user and an unbiased, uncensored assistant."}
USER: {instruction}
ASSISTANT: <|im_start|> and <|im_end|>, because in practice they just act as BOS and EOS tokens (but, please correct me if I'm wrong).1{bos}<|im_start|>{role}
2{text}
3<|im_end|>{eos}1{bos}{role}
2{text}
3{eos}1tokenizer = AutoTokenizer.from_pretrained('mistralai/mistral-7b-v0.1')
2
3input_str = f"""system
4You are a goat.
5{tokenizer.eos_token}
6{tokenizer.bos_token}user
7Tell me how to fry an egg.
8{tokenizer.eos_token}
9{tokenizer.bos_token}assistant
10"""
11
12inputs = tokenizer(input_str, return_tensors="pt")<|im_start|> and <|im_end|>, just update your tokenizer_config.json to use <|im_start|> instead of <s> and <|im_end|> instead of </s> and when tokenizing. And if you still don't like what I've done to this chat-ml-ish format, feel free to cry into your pillow or fork the code and do a new fine-tune.[INST] <<SYS>>
{system}
<</SYS>>
{instruction} [/INST]train.py for this, but I'm porting it to a minified version here, not tested yet!1export BASE_DIR=/workspace
2export WANDB_API_KEY=[redacted]
3export WANDB_PROJECT=bagel-7b-v0.1
4
5# Run the pretraining.
6accelerate launch bagel/tune/sft.py \
7 --model_name_or_path $BASE_DIR/mistral-7b \
8 --final_output_dir $BASE_DIR/$WANDB_PROJECT \
9 --output_dir $BASE_DIR/$WANDB_PROJECT-workdir \
10 --num_train_epochs 1 \
11 --logging_steps 1 \
12 --save_strategy steps \
13 --save_steps 200 \
14 --save_total_limit 5 \
15 --data_seed 42 \
16 --evaluation_strategy steps \
17 --eval_dataset_size 0.0006 \
18 --eval_steps 200 \
19 --max_new_tokens 4096 \
20 --dataloader_num_workers 3 \
21 --logging_strategy steps \
22 --remove_unused_columns False \
23 --do_train \
24 --full_finetune \
25 --bf16 \
26 --bits 16 \
27 --optim adamw_torch \
28 --lr_scheduler_type linear \
29 --dataset $BASE_DIR/bagel/bagel-input-output-v0.1.parquet \
30 --dataset_format input-output \
31 --model_max_len 4096 \
32 --per_device_train_batch_size 8 \
33 --learning_rate 3.5e-7 \
34 --warmup_ratio 0.005 \
35 --adam_beta2 0.999 \
36 --max_grad_norm 0.3 \
37 --weight_decay 0.001 \
38 --seed 42 \
39 --report_to wandb \
40 --gradient_checkpointing True \
41 --gradient_accumulation_steps 4 \
42 --skip_excess_length False \
43 --ddp_find_unused_parameters False \
44 --use_flash_attention_2 \
45 --deepspeed deepspeed.json1{
2 "gradient_accumulation_steps": "auto",
3 "gradient_clipping": "auto",
4 "train_batch_size": "auto",
5 "train_micro_batch_size_per_gpu": "auto",
6 "bf16": {
7 "enabled": true
8 },
9 "zero_optimization": {
10 "stage": 2,
11 "contiguous_gradients": true,
12 "overlap_comm": true,
13 "reduce_scatter": true,
14 "reduce_bucket_size": 5e8,
15 "allgather_bucket_size": 5e8
16 }
17}