初始化项目,由ModelHub XC社区提供模型
Model: Visixn/Index-9 Source: Original Platform
This commit is contained in:
30
README.md
Normal file
30
README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
||||
tags:
|
||||
- code
|
||||
- qlora
|
||||
- qwen2.5
|
||||
library_name: transformers
|
||||
---
|
||||
|
||||
# Index-9
|
||||
|
||||
`Qwen2.5-Coder-1.5B-Instruct` fine-tuned with QLoRA for coding (Python + web:
|
||||
JS/TS/HTML/CSS). Designed to be paired with live **web search** — a small model
|
||||
that leans on the web for facts. See the companion Space for the search-augmented
|
||||
chat demo.
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
|
||||
tok = AutoTokenizer.from_pretrained("Visixn/Index-9")
|
||||
model = AutoModelForCausalLM.from_pretrained("Visixn/Index-9")
|
||||
|
||||
msgs = [{"role": "user", "content": "Write a palindrome checker in Python"}]
|
||||
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
|
||||
out = model.generate(**tok(prompt, return_tensors="pt"), max_new_tokens=256)
|
||||
print(tok.decode(out[0], skip_special_tokens=True))
|
||||
```
|
||||
Reference in New Issue
Block a user