模型:
theblackcat102/pythia-1.4b-deduped-sft-r2
模型在 Open Assistant 个众包平台上进行了有监督的微调。
参见右侧的示例
用户(无论是直接用户还是下游用户),都应意识到该模型的风险、偏见和限制。需进一步提供更多信息以获得相关建议。
使用以下代码开始使用模型。
from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "theblackcat102/pythia-1.4b-deduped-sft-r2" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name).half().eval().cuda() input_text = """ <|startoftoken|>system You are a helpful assistant<|endoftoken|><|startoftoken|>human What's the population of the earth?<|endoftoken|><|startoftoken|>assistant """ inputs = tokenizer(input_text, return_tensors="pt", padding=True).to(0) outputs = model.generate( **inputs, early_stopping=True, max_new_tokens=args.max_new_tokens, do_sample=True, top_k=args.top_k, temperature=args.temperature, pad_token_id=tokenizer.eos_token_id, # dialogue_collator.py line 36 ) output = tokenizer.decode(outputs[0], truncate_before_pattern=[r"\n\n^#", "^'''", "\n\n\n"]) print(output)
deepspeed trainer_sft.py --configs defaults pythia-1-4b-ost --deepspeed
此模型经过200次迭代的训练。200次迭代后,准确率开始下降,损失增加,这是过拟合的迹象。
defaults: learning_rate: 1e-5 gradient_checkpointing: false gradient_accumulation_steps: 32 per_device_train_batch_size: 2 per_device_eval_batch_size: 2 weight_decay: 0.00 warmup_steps: 600 eval_steps: 250 save_steps: 250 max_length: 512 num_train_epochs: 2 logging_steps: 10 max_grad_norm: 2.0 save_total_limit: 4 fp16: true eval_accumulation_steps: freeze_layer: datasets: - oa_private: data_path: .cache split: sft val_split: 0.01 fraction: 1 file: 2023-02-26_oasst_default.jsonl cache_dir: .cache loss_fn: CrossEntropyLoss eval_size: log_dir: "base" quantization: false seq2seqmodel: false poly_eps: 1.0 fuse_gelu: false log_wandb: true samples_mixing: true # uses collator that mixes samples in the batch to create a single sample with possible multiple tasks within verbose: false pythia-1-4b-ost: learning_rate: 1e-6 model_name: EleutherAI/pythia-1.4b-deduped weight_decay: 0.01 max_length: 1024 warmup_steps: 100 gradient_checkpointing: false gradient_accumulation_steps: 12 per_device_train_batch_size: 5 per_device_eval_batch_size: 6 eval_steps: 100 save_steps: 100 num_train_epochs: 50 save_total_limit: 4
[需要更多信息]
[需要更多信息]
[需要更多信息]
[需要更多信息]
可以使用 Machine Learning Impact calculator 提供的 Lacoste et al. (2019) 来估算碳排放量。
[需要更多信息]
[需要更多信息]
[需要更多信息]
[需要更多信息]
BibTeX:
[需要更多信息]
APA:
[需要更多信息]
[需要更多信息]
[需要更多信息]
[需要更多信息]