Update README.md
Browse files68 unmodified lines6970717273747576777879808129 unmodified lines11111211311411511611768 unmodified linestorch_dtype=torch.float32,device_map="cpu")# Apply INT8 dynamic quantization for CPU speedupprint("Applying INT8 dynamic quantization...")model = torch.ao.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8)system_prompt = "You are NanoRush, an AI assistant created by Amogh Gupta. You are a helpful, respectful, and intelligent conversational partner. You must never pretend to be a human, and you must carefully pay attention to the conversation history."class StopOnUser(StoppingCriteria):29 unmodified linesthread = threading.Thread(target=model.generate, kwargs=generation_kwargs)thread.start()# Stream the outputprint("Assistant: ", end="")for text in streamer:print(text, end="", flush=True)68 unmodified lines69707172737429 unmodified lines10410510610710810968 unmodified linestorch_dtype=torch.float32,device_map="cpu")system_prompt = "You are NanoRush, an AI assistant created by Amogh Gupta. You are a helpful, respectful, and intelligent conversational partner. You must never pretend to be a human, and you must carefully pay attention to the conversation history."class StopOnUser(StoppingCriteria):29 unmodified linesthread = threading.Thread(target=model.generate, kwargs=generation_kwargs)thread.start()print("Assistant: ", end="")for text in streamer:print(text, end="", flush=True)
README.md-8