Cabbache commited on
Commit
f258cf1
·
verified ·
1 Parent(s): d362505

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md CHANGED
@@ -21,6 +21,46 @@ on a single consumer GPU (RTX 5060 Ti, 16 GB).
21
  It is fluent in Maltese but hallucinates and does not always reply with anything related to the prompt.
22
  It's able to translate english sentences into a related sentence in Maltese. It's quite bad at it but the Maltese translation is related somehow.
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ## What was done
25
 
26
  | stage | data | result |
 
21
  It is fluent in Maltese but hallucinates and does not always reply with anything related to the prompt.
22
  It's able to translate english sentences into a related sentence in Maltese. It's quite bad at it but the Maltese translation is related somehow.
23
 
24
+ ## How to run
25
+
26
+ ### Ollama
27
+
28
+ ```sh
29
+ ollama run hf.co/Cabbache/Fredu-1.7B-Instruct
30
+ ```
31
+
32
+ The prompt template and sampling parameters are stored in the repo, so nothing
33
+ else is needed. Pick a build with a tag:
34
+
35
+ | tag | size | notes |
36
+ |---|---|---|
37
+ | *(none)* / `:Q4_K_M` | 1.0 GB | 4-bit, the default. Runs on a laptop, loses the most accuracy |
38
+ | `:Q8_0` | 1.8 GB | 8-bit, close to full quality |
39
+ | `:F16` | 3.3 GB | no quantization |
40
+
41
+ The weights were trained in bfloat16, so even `F16` is a small conversion away
42
+ from the `safetensors` originals rather than a bit-exact copy.
43
+
44
+ ### transformers
45
+
46
+ ```python
47
+ from transformers import AutoModelForCausalLM, AutoTokenizer
48
+
49
+ tok = AutoTokenizer.from_pretrained("Cabbache/Fredu-1.7B-Instruct")
50
+ model = AutoModelForCausalLM.from_pretrained("Cabbache/Fredu-1.7B-Instruct",
51
+ dtype="bfloat16", device_map="auto")
52
+
53
+ q = "X'inhu l-Kunsill Lokali f'Malta?"
54
+ ids = tok(f"Mistoqsija: {q}\nTweġiba:", return_tensors="pt").to(model.device)
55
+ out = model.generate(**ids, max_new_tokens=200, temperature=0.3, do_sample=True)
56
+ print(tok.decode(out[0], skip_special_tokens=True))
57
+ ```
58
+
59
+ There is no chat template — use the `Mistoqsija:/Tweġiba:` framing above, which
60
+ is what the model was trained on. A low temperature helps: what factual
61
+ knowledge it has is held with very little margin and does not survive sampling
62
+ at 0.7.
63
+
64
  ## What was done
65
 
66
  | stage | data | result |