Text Generation
Transformers
Safetensors
PEFT
English
gemma
lora
presentation-templates
information-retrieval
crello
conversational
Instructions to use mudasir13cs/Field-adaptive-description-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mudasir13cs/Field-adaptive-description-generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mudasir13cs/Field-adaptive-description-generator") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mudasir13cs/Field-adaptive-description-generator", dtype="auto") - PEFT
How to use mudasir13cs/Field-adaptive-description-generator with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mudasir13cs/Field-adaptive-description-generator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mudasir13cs/Field-adaptive-description-generator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mudasir13cs/Field-adaptive-description-generator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mudasir13cs/Field-adaptive-description-generator
- SGLang
How to use mudasir13cs/Field-adaptive-description-generator 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 "mudasir13cs/Field-adaptive-description-generator" \ --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": "mudasir13cs/Field-adaptive-description-generator", "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 "mudasir13cs/Field-adaptive-description-generator" \ --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": "mudasir13cs/Field-adaptive-description-generator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mudasir13cs/Field-adaptive-description-generator with Docker Model Runner:
docker model run hf.co/mudasir13cs/Field-adaptive-description-generator
Update README.md
Browse files
README.md
CHANGED
|
@@ -78,8 +78,24 @@ model = AutoModelForCausalLM.from_pretrained("mudasir13cs/Field-adaptive-descrip
|
|
| 78 |
tokenizer = AutoTokenizer.from_pretrained("mudasir13cs/Field-adaptive-description-generator")
|
| 79 |
|
| 80 |
# Generate content
|
| 81 |
-
input_text = "
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 84 |
outputs = model.generate(**inputs, max_length=512, temperature=0.7, do_sample=True)
|
| 85 |
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
|
|
| 78 |
tokenizer = AutoTokenizer.from_pretrained("mudasir13cs/Field-adaptive-description-generator")
|
| 79 |
|
| 80 |
# Generate content
|
| 81 |
+
input_text = """<start_of_turn>user
|
| 82 |
+
Generate a 50-80 word SEO-friendly description for this presentation template:
|
| 83 |
+
Title: Modern Business Presentation
|
| 84 |
+
Visual Elements: minimalist design, blue gradient background, geometric shapes
|
| 85 |
+
Industries: Business, Marketing
|
| 86 |
+
Categories: Corporate, Professional
|
| 87 |
+
Tags: Modern, Clean, Professional
|
| 88 |
+
|
| 89 |
+
Requirements:
|
| 90 |
+
- Describe visual style naturally
|
| 91 |
+
- Mention 2-3 specific use cases
|
| 92 |
+
- Integrate keywords organically (no markdown/bold formatting)
|
| 93 |
+
- Professional yet engaging tone
|
| 94 |
+
- Exactly 50-80 words
|
| 95 |
+
- Start directly with the description (no prefixes)
|
| 96 |
+
<end_of_turn>
|
| 97 |
+
<start_of_turn>model
|
| 98 |
+
"""
|
| 99 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 100 |
outputs = model.generate(**inputs, max_length=512, temperature=0.7, do_sample=True)
|
| 101 |
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|