GaborMadarasz commited on
Commit
ff33f52
verified
1 Parent(s): 2ed1fb1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -1
README.md CHANGED
@@ -67,4 +67,33 @@ MambaForCausalLM(
67
 
68
  Concerns:
69
 
70
- Potential for biased, incorrect, or harmful content generation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
  Concerns:
69
 
70
+ Potential for biased, incorrect, or harmful content generation.
71
+
72
+
73
+
74
+ ## **Usage Example**
75
+
76
+ To generate text using this model with Hugging Face's `pipeline`, use the following Python code:
77
+
78
+ ```python
79
+ from transformers import pipeline
80
+
81
+ # Load the model
82
+ model_name = "NYTK/PULI-HuBA130M"
83
+
84
+ # Initialize the text generation pipeline
85
+ generator = pipeline("text-generation", model=model_name)
86
+
87
+ # Generate text with recommended parameters
88
+ output = generator(
89
+ "Az a t茅ny, hogy anyanyelvem magyar, 茅s magyarul besz茅lek, gondolkozom, 铆rok, 茅letem legnagyobb esem茅nye, melyhez nincs foghat贸.", # Example prompt in Hungarian
90
+ max_length=156,
91
+ do_sample=True,
92
+ repetition_penalty=1.35,
93
+ temperature=0.2,
94
+ top_k=100,
95
+ top_p=0.99
96
+ )
97
+
98
+ # Print the generated text
99
+ print(output[0]["generated_text"])