PingVortex commited on
Commit
cdd919a
·
verified ·
1 Parent(s): 5a4710c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -3
README.md CHANGED
@@ -1,3 +1,65 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - llama
8
+ - causal-lm
9
+ - experimental
10
+ ---
11
+ # PingVortexLM-20M
12
+ A small experimental language model based on LLaMA architecture trained on custom English dataset with around 100M tokens.
13
+ This model is just an experiment, it is not capable of basic English conversations.
14
+
15
+ Built by [PingVortex Labs](https://github.com/PingVortexLabs).
16
+
17
+ ---
18
+ ## Model Details
19
+ + **Parameters:** 20M
20
+ + **Context length:** 8192 tokens
21
+ + **Language:** English only
22
+ + **Format:** ChatML
23
+ + **License:** Apache 2.0
24
+
25
+ ---
26
+ ## Usage
27
+ ```python
28
+ from transformers import AutoTokenizer, AutoModelForCausalLM
29
+ import torch
30
+
31
+ model_path = "pvlabs/PingVortexLM-20M"
32
+
33
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
34
+ model = AutoModelForCausalLM.from_pretrained(model_path, dtype=torch.float16)
35
+ model.eval()
36
+
37
+ prompt = "<|im_start|>user\nWhat is the capital of France?<|im_end|>\n<|im_start|>assistant\n"
38
+ inputs = tokenizer(prompt, return_tensors="pt")
39
+
40
+ with torch.no_grad():
41
+ output = model.generate(
42
+ **inputs,
43
+ max_new_tokens=200,
44
+ do_sample=True,
45
+ temperature=0.7,
46
+ top_p=0.9,
47
+ eos_token_id=tokenizer.convert_tokens_to_ids("<|im_end|>"),
48
+ pad_token_id=tokenizer.eos_token_id,
49
+ )
50
+
51
+ generated = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
52
+ print(generated)
53
+ ```
54
+
55
+ ---
56
+ ## Prompt Format (ChatML)
57
+ The model uses the standard ChatML format:
58
+ ```
59
+ <|im_start|>user
60
+ Your message here<|im_end|>
61
+ <|im_start|>assistant
62
+ ```
63
+
64
+ ---
65
+ *Made by [PingVortex](https://pingvortex.com).*