Skip to content

Commit 79a33f9

Browse files
committed
Minor fixes.
1 parent 8bc19bb commit 79a33f9

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

readme_ready/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def url_validator(x):
5656
if mode.lower() == "readme":
5757
headings = questionary.text(
5858
message="List of Readme Headings?(comma separated)"
59-
+ "[Example: # Introduction,## Usage]"
59+
+ "[Example: Introduction,Usage]"
6060
).ask()
6161

6262
model_name = questionary.select(

readme_ready/query/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def generate_readme(
122122
for heading in headings:
123123
question = (
124124
"Provide the README content for the section with "
125-
+ f"heading \"{heading}\" starting with ## {heading}."
125+
+ f'heading "{heading}" starting with ## {heading}.'
126126
)
127127
try:
128128
response = chain.invoke({"input": question})

readme_ready/utils/llm_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def get_gemma_chat_model(model_name: str, streaming=False, model_kwargs=None):
2222
gguf_file = model_kwargs["gguf_file"]
2323
_ = hf_hub_download(model_name, gguf_file)
2424
tokenizer = get_tokenizer(model_name, gguf_file)
25-
if sys.platform == "linux" or sys.platform == "linux2":
25+
if (
26+
sys.platform == "linux" or sys.platform == "linux2"
27+
) and "gptq" not in model_name.lower():
2628
from transformers import BitsAndBytesConfig
2729

2830
bnb_config = BitsAndBytesConfig(
@@ -76,7 +78,9 @@ def get_llama_chat_model(model_name: str, streaming=False, model_kwargs=None):
7678
_ = hf_hub_download(model_name, gguf_file)
7779
tokenizer = get_tokenizer(model_name, gguf_file)
7880
tokenizer.pad_token = tokenizer.eos_token
79-
if sys.platform == "linux" or sys.platform == "linux2":
81+
if (
82+
sys.platform == "linux" or sys.platform == "linux2"
83+
) and "gptq" not in model_name.lower():
8084
from transformers import BitsAndBytesConfig
8185

8286
bnb_config = BitsAndBytesConfig(

0 commit comments

Comments
 (0)