Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

prog-love
/
rostamiai

Text Generation
PEFT
Safetensors
Transformers
gemma4
image-text-to-text
lora
sft
trl
unsloth
conversational
Model card Files Files and versions
xet
Community

Instructions to use prog-love/rostamiai with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • PEFT

    How to use prog-love/rostamiai with PEFT:

    from peft import PeftModel
    from transformers import AutoModelForCausalLM
    
    base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-e2b-it-unsloth-bnb-4bit")
    model = PeftModel.from_pretrained(base_model, "prog-love/rostamiai")
  • Transformers

    How to use prog-love/rostamiai with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="prog-love/rostamiai")
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
                {"type": "text", "text": "What animal is on the candy?"}
            ]
        },
    ]
    pipe(text=messages)
    # Load model directly
    from transformers import AutoProcessor, AutoModelForMultimodalLM
    
    processor = AutoProcessor.from_pretrained("prog-love/rostamiai")
    model = AutoModelForMultimodalLM.from_pretrained("prog-love/rostamiai", device_map="auto")
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
                {"type": "text", "text": "What animal is on the candy?"}
            ]
        },
    ]
    inputs = processor.apply_chat_template(
    	messages,
    	add_generation_prompt=True,
    	tokenize=True,
    	return_dict=True,
    	return_tensors="pt",
    ).to(model.device)
    
    outputs = model.generate(**inputs, max_new_tokens=40)
    print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use prog-love/rostamiai with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "prog-love/rostamiai"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "prog-love/rostamiai",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/prog-love/rostamiai
  • SGLang

    How to use prog-love/rostamiai with SGLang:

    Install from pip and serve model
    # Install SGLang from pip:
    pip install sglang
    # Start the SGLang server:
    python3 -m sglang.launch_server \
        --model-path "prog-love/rostamiai" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "prog-love/rostamiai",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker images
    docker run --gpus all \
        --shm-size 32g \
        -p 30000:30000 \
        -v ~/.cache/huggingface:/root/.cache/huggingface \
        --env "HF_TOKEN=<secret>" \
        --ipc=host \
        lmsysorg/sglang:latest \
        python3 -m sglang.launch_server \
            --model-path "prog-love/rostamiai" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "prog-love/rostamiai",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Unsloth Studio

    How to use prog-love/rostamiai with Unsloth Studio:

    Install Unsloth Studio (macOS, Linux, WSL)
    curl -fsSL https://unsloth.ai/install.sh | sh
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for prog-love/rostamiai to start chatting
    Install Unsloth Studio (Windows)
    irm https://unsloth.ai/install.ps1 | iex
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for prog-love/rostamiai to start chatting
    Using HuggingFace Spaces for Unsloth
    # No setup required
    # Open https://huggingface.co/spaces/unsloth/studio in your browser
    # Search for prog-love/rostamiai to start chatting
    Load model with FastModel
    pip install unsloth
    from unsloth import FastModel
    model, tokenizer = FastModel.from_pretrained(
        model_name="prog-love/rostamiai",
        max_seq_length=2048,
    )
  • Docker Model Runner

    How to use prog-love/rostamiai with Docker Model Runner:

    docker model run hf.co/prog-love/rostamiai
rostamiai
Ctrl+K
Ctrl+K
  • 1 contributor
History: 10 commits
prog-love's picture
prog-love
Delete checkpoint-90
81e42d5 verified 3 months ago
  • checkpoint-190
    Upload folder using huggingface_hub 3 months ago
  • .gitattributes
    1.57 kB
    (Trained with Unsloth) 3 months ago
  • README.md
    1.64 kB
    Upload folder using huggingface_hub 3 months ago
  • adapter_config.json
    1.26 kB
    Upload folder using huggingface_hub 3 months ago
  • adapter_model.safetensors
    124 MB
    xet
    Upload folder using huggingface_hub 3 months ago
  • chat_template.jinja
    16.8 kB
    (Trained with Unsloth) 3 months ago
  • config.json
    5.91 kB
    (Trained with Unsloth) 3 months ago
  • generation_config.json
    203 Bytes
    (Trained with Unsloth) 3 months ago
  • processor_config.json
    1.69 kB
    (Trained with Unsloth) 3 months ago
  • tokenizer.json
    32.2 MB
    xet
    (Trained with Unsloth) 3 months ago
  • tokenizer_config.json
    6.86 kB
    Upload folder using huggingface_hub 3 months ago
  • training_args.bin

    Detected Pickle imports (10)

    • "transformers.trainer_utils.SchedulerType",
    • "transformers.trainer_pt_utils.AcceleratorConfig",
    • "transformers.trainer_utils.HubStrategy",
    • "transformers.trainer_utils.IntervalStrategy",
    • "transformers.trainer_utils.SaveStrategy",
    • "UnslothSFTTrainer.UnslothSFTConfig",
    • "accelerate.state.PartialState",
    • "torch.device",
    • "accelerate.utils.dataclasses.DistributedType",
    • "transformers.training_args.OptimizerNames"

    How to fix it?

    5.78 kB
    xet
    Upload folder using huggingface_hub 3 months ago