aixsatoshi
commited on
Commit
•
a4b3ace
1
Parent(s):
e5cdbb0
Update README.md
Browse files
README.md
CHANGED
@@ -62,6 +62,9 @@ model_name = "aixsatoshi/Honyaku-Multi-Translator-Swallow-ms7b"
|
|
62 |
model = AutoModelForCausalLM.from_pretrained(model_name).to("cuda")
|
63 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
64 |
|
|
|
|
|
|
|
65 |
# Define the English prompt
|
66 |
english_prompt = """
|
67 |
Water, essential for all forms of life, is commonly found in diverse sources such as rivers, oceans, and even within organisms. This transparent fluid, which makes up a significant percentage of the human body, plays a pivotal role in ensuring daily hydration and supporting our body's intricate physiological functions.However, within the vast realm of biology, it's not just about drinking water. The intricate process of osmosis in our cells ensures a proper balance of vital electrolytes. Elements like sodium and potassium are crucial for various cellular functions, and without the precise regulation through osmosis, cells might experience detrimental effects, such as shriveling up or swelling to the point of bursting.In the fascinating world of neuroscience, the term "synaptic plasticity" refers to the remarkable ability of the synapses—the junctions between neurons—to strengthen or weaken over time. This plasticity, modulated by various factors including neurotrophins, plays an indispensable role in processes like learning and memory. Meanwhile, in the domain of cardiology, there's the concern of atherosclerosis. This condition, characterized by the hardening and narrowing of arteries due to plaque buildup, can lead to severe complications, such as coronary artery disease, affecting the heart's blood supply.In conclusion, the vast complexities of human biology stretch from basic hydration principles to advanced cellular mechanisms and even intricate vascular processes. Gaining a deep understanding of these multifaceted systems not only requires interdisciplinary knowledge but also demands precise translation of specialized terms, especially when sharing knowledge across linguistic and cultural boundaries.
|
@@ -70,9 +73,6 @@ Water, essential for all forms of life, is commonly found in diverse sources suc
|
|
70 |
# Prepare the prompt for English to Japanese translation
|
71 |
prompt = f"<english>: {english_prompt} </english>\n\n<japanese>:\n"
|
72 |
|
73 |
-
# Define the streamer
|
74 |
-
streamer = TextStreamer(tokenizer)
|
75 |
-
|
76 |
# Tokenize the input text and move to CUDA device
|
77 |
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
78 |
|
|
|
62 |
model = AutoModelForCausalLM.from_pretrained(model_name).to("cuda")
|
63 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
64 |
|
65 |
+
# Define the streamer
|
66 |
+
streamer = TextStreamer(tokenizer)
|
67 |
+
|
68 |
# Define the English prompt
|
69 |
english_prompt = """
|
70 |
Water, essential for all forms of life, is commonly found in diverse sources such as rivers, oceans, and even within organisms. This transparent fluid, which makes up a significant percentage of the human body, plays a pivotal role in ensuring daily hydration and supporting our body's intricate physiological functions.However, within the vast realm of biology, it's not just about drinking water. The intricate process of osmosis in our cells ensures a proper balance of vital electrolytes. Elements like sodium and potassium are crucial for various cellular functions, and without the precise regulation through osmosis, cells might experience detrimental effects, such as shriveling up or swelling to the point of bursting.In the fascinating world of neuroscience, the term "synaptic plasticity" refers to the remarkable ability of the synapses—the junctions between neurons—to strengthen or weaken over time. This plasticity, modulated by various factors including neurotrophins, plays an indispensable role in processes like learning and memory. Meanwhile, in the domain of cardiology, there's the concern of atherosclerosis. This condition, characterized by the hardening and narrowing of arteries due to plaque buildup, can lead to severe complications, such as coronary artery disease, affecting the heart's blood supply.In conclusion, the vast complexities of human biology stretch from basic hydration principles to advanced cellular mechanisms and even intricate vascular processes. Gaining a deep understanding of these multifaceted systems not only requires interdisciplinary knowledge but also demands precise translation of specialized terms, especially when sharing knowledge across linguistic and cultural boundaries.
|
|
|
73 |
# Prepare the prompt for English to Japanese translation
|
74 |
prompt = f"<english>: {english_prompt} </english>\n\n<japanese>:\n"
|
75 |
|
|
|
|
|
|
|
76 |
# Tokenize the input text and move to CUDA device
|
77 |
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
78 |
|