ferran-espuna commited on
Commit
46244ce
·
verified ·
1 Parent(s): 948f5ad

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -1
README.md CHANGED
@@ -62,7 +62,25 @@ This model card corresponds to the gptq-quantized version of Salamandra-7b for s
62
  The entire Salamandra family is released under a permissive [Apache 2.0 license]((https://www.apache.org/licenses/LICENSE-2.0)).
63
 
64
 
65
- ## Additional information
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  ### Author
68
  International Business Machines (IBM).
 
62
  The entire Salamandra family is released under a permissive [Apache 2.0 license]((https://www.apache.org/licenses/LICENSE-2.0)).
63
 
64
 
65
+ # How to Use
66
+
67
+ The following example code works under ``Python 3.9.16``, ``vllm==0.6.3.post1``, ``torch==2.4.0`` and ``torchvision==0.19.0``, though it should run on
68
+ any current version of the libraries. This is an example of how to create a text completion using the model:
69
+
70
+ ```
71
+ from vllm import LLM, SamplingParams
72
+
73
+ model_name = "BSC-LT/salamandra-2b-base-gptq"
74
+ llm = LLM(model=model_name)
75
+
76
+ outputs = llm.generate("El mercat del barri ",
77
+ sampling_params=SamplingParams(
78
+ temperature=0.5,
79
+ max_tokens=200)
80
+ )
81
+ print(outputs[0].outputs[0].text)
82
+
83
+ ```
84
 
85
  ### Author
86
  International Business Machines (IBM).