Views
No views yet
Qwen/Qwen2.5-7B-Instruct that classifies a single YouTube comment
across eight dimensions and returns them as JSON. It powers
CommentLens, an app that turns a
thousand comments into a clear picture of what an audience is actually saying.Qwen/Qwen2.5-7B-Instruct. Apply it with vLLM's LoRA support or PEFT.| field | description |
|---|---|
valence | positive / negative / neutral / mixed |
intent | appreciation, question, request, personal_experience, humor, ... |
emotion | gratitude, excitement, hope, confusion, sarcasm, ... |
stance | trust, skepticism, certainty, uncertainty, curiosity |
target | creator, video_content, topic, self_life, ... |
orientation | passive_reaction, wants_more_info, ready_to_act, ... |
persona | beginner, expert, aspirational, critic_troll, loyal_fan |
feedback | clarity, depth, accuracy, pacing, relevance |
<|im_start|>system
You are a YouTube comment analyzer. Analyze the given comment and classify it
across multiple dimensions. Return a JSON object with these fields: valence,
intent, emotion, stance, target, orientation, persona, feedback<|im_end|>
<|im_start|>user
Analyze this YouTube comment:
{comment}<|im_end|>
<|im_start|>assistanttemperature=0) for stable JSON.1from vllm import LLM, SamplingParams
2from vllm.lora.request import LoRARequest
3from huggingface_hub import snapshot_download
4
5adapter = snapshot_download("vellumy/commentlens-qwen")
6llm = LLM(model="Qwen/Qwen2.5-7B-Instruct", enable_lora=True, max_lora_rank=64,
7 dtype="bfloat16", max_model_len=2048)
8# ... build the ChatML prompt above, then:
9out = llm.generate([prompt], SamplingParams(temperature=0, max_tokens=128,
10 stop=["<|im_end|>"]),
11 lora_request=LoRARequest("commentlens", 1, adapter))
12print(out[0].outputs[0].text)MODEL_PROVIDER=local and HF_MODEL_ID=vellumy/commentlens-qwen.