Irfanuruchi commited on
Commit
6702f09
·
verified ·
1 Parent(s): 6f18a97

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -37
README.md CHANGED
@@ -62,35 +62,8 @@ datasets:
62
  ### Option 1: From Hugging Face Hub (Recommended)
63
 
64
  ```python
65
- from transformers import AutoModelForCausalLM, AutoTokenizer
66
 
67
  model_id = "Irfanuruchi/Llama-3.2-1B-Computer-Engineering-LLM"
68
-
69
- model = AutoModelForCausalLM.from_pretrained(
70
- model_id,
71
- device_map="auto",
72
- torch_dtype="auto",
73
- trust_remote_code=True
74
- )
75
-
76
- tokenizer = AutoTokenizer.from_pretrained(
77
- model_id,
78
- use_fast=False # Required for proper Llama tokenization
79
- )
80
-
81
- prompt = "Explain the von Neumann architecture:"
82
- inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
83
-
84
- outputs = model.generate(
85
- **inputs,
86
- max_new_tokens=200,
87
- temperature=0.7,
88
- top_p=0.9,
89
- do_sample=True,
90
- repetition_penalty=1.1
91
- )
92
-
93
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
94
  ```
95
 
96
  ### Option 2: Local Installation (Git LFS Required)
@@ -103,16 +76,6 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
103
  # Replace with your local path
104
  model_path = "./Llama-3.2-1B-ComputerEngineeringLLM"
105
 
106
- model = AutoModelForCausalLM.from_pretrained(
107
- model_path,
108
- device_map="auto",
109
- local_files_only=True
110
- )
111
- tokenizer = AutoTokenizer.from_pretrained(
112
- model_path,
113
- use_fast=False, # Required for Llama tokenizer
114
- local_files_only=True
115
- )
116
  ```
117
 
118
  *Recomended Config*
 
62
  ### Option 1: From Hugging Face Hub (Recommended)
63
 
64
  ```python
 
65
 
66
  model_id = "Irfanuruchi/Llama-3.2-1B-Computer-Engineering-LLM"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ```
68
 
69
  ### Option 2: Local Installation (Git LFS Required)
 
76
  # Replace with your local path
77
  model_path = "./Llama-3.2-1B-ComputerEngineeringLLM"
78
 
 
 
 
 
 
 
 
 
 
 
79
  ```
80
 
81
  *Recomended Config*