موقع اجرا در unsloth: A new version of the following files was downloaded from https://huggingface.co/arshiaafshani/Arsh-V1:
- configuration_arsh.py
. Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-111a124d29fa> in <cell line: 0>()
     18 ]  # More models at https://docs.unsloth.ai/get-started/all-our-models
     19 
---> 20 model, tokenizer = FastLanguageModel.from_pretrained(
     21     model_name = "arshiaafshani/Arsh-V1",
     22     max_seq_length = max_seq_length,

/usr/local/lib/python3.11/dist-packages/unsloth/models/loader.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, trust_remote_code, use_gradient_checkpointing, resize_model_vocab, revision, use_exact_model_name, fast_inference, gpu_memory_utilization, float8_kv_cache, random_state, max_lora_rank, disable_log_stats, *args, **kwargs)
    175                     f"to obtain the latest transformers build, then restart this session."\
    176                 ) 
--> 177             raise RuntimeError(autoconfig_error or peft_error)
    178         pass
    179 

RuntimeError: 'str' object has no attribute '__name__'

کدم: from unsloth import FastLanguageModel  # FastVisionModel for LLMs
import torch
max_seq_length = 2048  # Choose any! We auto support RoPE Scaling internally!
load_in_4bit = True  # Use 4bit quantization to reduce memory usage. Can be False.

# 4bit pre quantized models we support for 4x faster downloading + no OOMs.
fourbit_models = [
    "unsloth/Meta-Llama-3.1-8B-bnb-4bit",  # Llama-3.1 2x faster
    "unsloth/Mistral-Small-Instruct-2409",  # Mistral 22b 2x faster!
    "unsloth/Phi-4",  # Phi-4 2x faster!
    "unsloth/Phi-4-unsloth-bnb-4bit",  # Phi-4 Unsloth Dynamic 4-bit Quant
    "unsloth/gemma-2-9b-bnb-4bit",  # Gemma 2x faster!
    "unsloth/Qwen2.5-7B-Instruct-bnb-4bit"  # Qwen 2.5 2x faster!
    "unsloth/Llama-3.2-1B-bnb-4bit",  # NEW! Llama 3.2 models
    "unsloth/Llama-3.2-1B-Instruct-bnb-4bit",
    "unsloth/Llama-3.2-3B-bnb-4bit",
    "unsloth/Llama-3.2-3B-Instruct-bnb-4bit",
]  # More models at https://docs.unsloth.ai/get-started/all-our-models

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "arshiaafshani/Arsh-V1",
    max_seq_length = max_seq_length,
    load_in_4bit = load_in_4bit,
trust_remote_code=True
    # token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf
)

کد configuration.py: from transformers import LlamaConfig, AutoConfig, AutoModelForCausalLM

class ArshConfig(LlamaConfig):
    model_type = "arsh"
    
    def __init__(
        self,
        unsloth_fixed=True,
        unsloth_version="2025.1.8",
        **kwargs
    ):
        super().__init__(**kwargs)
        self.unsloth_fixed = unsloth_fixed  # اصلاح فاصله‌گذاری (indentation)
        self.unsloth_version = unsloth_version  # اصلاح فاصله‌گذاری

# ثبت پیکربندی باید خارج از کلاس انجام شود
AutoConfig.register("arsh", ArshConfig)
AutoModelForCausalLM.register(ArshConfig, AutoModelForCausalLM._model_mapping["llama"])