wesjos commited on
Commit
060f03d
·
verified ·
1 Parent(s): 4b3799d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -5
README.md CHANGED
@@ -7,6 +7,11 @@ tags:
7
  - unsloth
8
  - sft
9
  licence: license
 
 
 
 
 
10
  ---
11
 
12
  # Model Card for Qwen3-0.6B-Alpaca
@@ -17,12 +22,34 @@ It has been trained using [TRL](https://github.com/huggingface/trl).
17
  ## Quick start
18
 
19
  ```python
20
- from transformers import pipeline
21
 
22
- question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
- generator = pipeline("text-generation", model="None", device="cuda")
24
- output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
- print(output["generated_text"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ```
27
 
28
  ## Training procedure
 
7
  - unsloth
8
  - sft
9
  licence: license
10
+ datasets:
11
+ - RaagulQB/alpaca_coding_dataset_full
12
+ - tatsu-lab/alpaca
13
+ base_model:
14
+ - Qwen/Qwen3-0.6B-Base
15
  ---
16
 
17
  # Model Card for Qwen3-0.6B-Alpaca
 
22
  ## Quick start
23
 
24
  ```python
25
+ from transformers import AutoModelForCausalLM, AutoTokenizer
26
 
27
+ model_name='wesjos/Qwen3-0.6B-Alpaca'
28
+
29
+ model=AutoModelForCausalLM.from_pretrained(model_name)
30
+ tokenizer=AutoTokenizer.from_pretrained(model_name)
31
+
32
+ alpaca_prompt = """"Below is an instruction that describes a task. Write a response that appropriately completes the request.
33
+
34
+ ### Instruction:
35
+ {}
36
+
37
+ ### Input:
38
+ {}
39
+
40
+ ### Response:
41
+ """
42
+
43
+ inputs = tokenizer(
44
+ [
45
+ alpaca_prompt.format(
46
+ "完成以下代码要求", # instruction
47
+ "使用python写一个transformer神经网络" #Input
48
+ )
49
+ ], return_tensors = "pt").to("cuda")
50
+
51
+ outputs = model.generate(**inputs, max_new_tokens=1024, use_cache=True,temperature=0.6,do_sample=True,top_p=0.95,top_k=20)
52
+ print(tokenizer.batch_decode(outputs)[0])
53
  ```
54
 
55
  ## Training procedure