File size: 2,366 Bytes
5909fdf 6839f22 5909fdf 765788e 5909fdf 765788e 9f410e0 765788e 5909fdf 6839f22 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | ---
language:
- ko
- en
tags:
- text-generation
- keyword-extraction
- tag-generation
license: apache-2.0
---
# Qwen3-0.6B Float:Right Tagger (https://float-right.app)
This repository contains a fine-tuned tag generator based on **Qwen/Qwen3-0.6B**.
This model was built for on-device AI tag generation in the Float:Right app.
Float:Right is an automatic tag generation and classification app
GGUF : https://huggingface.co/FloatDo/qwen3-0.6b-float-right-tagger-GGUF
์ด๊ฒ์ Float:Right ์ฑ์ ์ฌ์ฉํ ์จ๋๋ฐ์ด์ค AI ํ๊ทธ์์ฑ์ฉ๋๋ก ๋ง๋ค์ด์ก์ต๋๋ค.
์๋ ํ๊ทธ์์ฑ, ๋ถ๋ฅ์ฑ Float:Right.
https://float-right.app
## What it does
Given a memo/text, it returns **a JSON array of 3โ10 tags**:
- Prefer coarse tags (not overly detailed)
- Keeps the same language as input (Korean -> Korean, English -> English)
- Avoids underscores `_`
> In production, parse only the first JSON array `[ ... ]` from the output.
## Quick usage (Transformers)
```python
import json, re, torch
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_DIR = "./" # or your HF repo id
tok = AutoTokenizer.from_pretrained(MODEL_DIR, trust_remote_code=True)
if tok.pad_token is None:
tok.pad_token = tok.eos_token
model = AutoModelForCausalLM.from_pretrained(
MODEL_DIR, torch_dtype="auto", device_map="cuda", trust_remote_code=True
)
def extract_array(s: str):
m = re.search(r"\[[\s\S]*?\]", s)
if not m:
return None
return json.loads(m.group(0))
text = "์ค๋ ์์ธ์์ AI ์ปจํผ๋ฐ์ค๋ฅผ ๋ค๋
์๋ค."
messages = [
{"role": "system", "content": "๋๋ ํ๊ทธ ์์ฑ๊ธฐ๋ค. ์ถ๋ ฅ์ JSON ๋ฐฐ์ด ํ๋๋ง."},
{"role": "user", "content": f"๋ฌธ์ฅ: {text}\nํ๊ทธ 3~10๊ฐ. ๋๋ฌด ๋ํ
์ผํ์ง ์๊ฒ. ์ธ๋์ค์ฝ์ด ๊ธ์ง. JSON ๋ฐฐ์ด๋ง."},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
enc = tok(prompt, return_tensors="pt").to("cuda")
out = model.generate(**enc, max_new_tokens=64, do_sample=False)
decoded = tok.decode(out[0], skip_special_tokens=True)
print(extract_array(decoded))
```
Notes
โข Some outputs may include extra tokens (e.g., <think>). In production, extract only the first JSON array [ ... ].
โข Training data is intended to avoid sensitive information.
Credits
โข Base model: Qwen/Qwen3-0.6B
โข Project: Float-Right |