persadian commited on
Commit
529796e
·
verified ·
1 Parent(s): 085f81d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -3
README.md CHANGED
@@ -47,15 +47,23 @@ base_model: persadian/persadian-Nano-V4
47
  | Inference Efficiency | Infrastructure-heavy | ✅Optimized for constrained hardware |
48
  | Innovation Focus | Scale-first | ✅Efficiency-first with adaptive systems |
49
 
50
- ## Quick Start
51
- ```from transformers import AutoModelForCausalLM, AutoTokenizer
52
 
53
- # The trust_remote_code=True flag is still required for custom models
 
 
 
54
  model = AutoModelForCausalLM.from_pretrained(
55
  "persadian/persadian-nano-v4",
56
  trust_remote_code=True
57
  )
58
  tokenizer = AutoTokenizer.from_pretrained("persadian/persadian-nano-v4")
 
 
 
 
 
 
59
  ```
60
 
61
  ## Citation
 
47
  | Inference Efficiency | Infrastructure-heavy | ✅Optimized for constrained hardware |
48
  | Innovation Focus | Scale-first | ✅Efficiency-first with adaptive systems |
49
 
50
+ ## Usage
 
51
 
52
+ ```python
53
+ from transformers import AutoModelForCausalLM, AutoTokenizer
54
+
55
+ # Load the custom model with its tokenizer
56
  model = AutoModelForCausalLM.from_pretrained(
57
  "persadian/persadian-nano-v4",
58
  trust_remote_code=True
59
  )
60
  tokenizer = AutoTokenizer.from_pretrained("persadian/persadian-nano-v4")
61
+
62
+ # Generate text
63
+ prompt = "Once upon a time"
64
+ inputs = tokenizer(prompt, return_tensors="pt")
65
+ output = model.generate(**inputs, max_new_tokens=50)
66
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
67
  ```
68
 
69
  ## Citation